protected class FSTDictionary.Browser extends Object implements IndexDictionary.Browser
Modifier and Type | Field and Description |
---|---|
protected long |
blockFilePointer |
protected int |
blockPrefixLen |
protected BytesRefFSTEnum<Long> |
fstEnum |
protected BytesRefBuilder |
keyBuilder |
protected int |
state |
protected static int |
STATE_END |
protected static int |
STATE_NEXT |
protected static int |
STATE_SEEK |
Modifier | Constructor and Description |
---|---|
protected |
Browser() |
Modifier and Type | Method and Description |
---|---|
long |
getBlockFilePointer()
Returns the block file pointer associated with the key returned.
|
int |
getBlockPrefixLen()
Returns the number of characters of this block's key that is in common with all terms in this block.
|
BytesRef |
nextKey()
Returns the next block key and positions the browser at this key.
|
BytesRef |
peekKey()
Returns the next key without advancing.
|
long |
seekBlock(BytesRef term)
Seeks the given term in the
IndexDictionary and returns its corresponding
block file pointer. |
protected final BytesRefFSTEnum<Long> fstEnum
protected static final int STATE_SEEK
protected static final int STATE_NEXT
protected static final int STATE_END
protected int state
protected final BytesRefBuilder keyBuilder
protected int blockPrefixLen
protected long blockFilePointer
public long seekBlock(BytesRef term)
IndexDictionary.Browser
IndexDictionary
and returns its corresponding
block file pointer.seekBlock
in interface IndexDictionary.Browser
-1
if there is no floor block key because the searched
term precedes alphabetically the first block key of the dictionary.public BytesRef nextKey()
IndexDictionary.Browser
nextKey
in interface IndexDictionary.Browser
public BytesRef peekKey()
IndexDictionary.Browser
IndexDictionary.Browser.nextKey()
returns a non-null result.peekKey
in interface IndexDictionary.Browser
public int getBlockPrefixLen()
IndexDictionary.Browser
IndexDictionary.Browser.nextKey()
returns a non-null result.getBlockPrefixLen
in interface IndexDictionary.Browser
public long getBlockFilePointer()
IndexDictionary.Browser
IndexDictionary.Browser.nextKey()
returns a non-null result.getBlockFilePointer
in interface IndexDictionary.Browser
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.