Method | Description | |
---|---|---|
Add ( BytesRef bytes ) : int |
Adds a new BytesRef
|
|
AddByPoolOffset ( int offset ) : int |
Adds a "arbitrary" int offset instead of a BytesRef term. this is used in the indexer to hold the hash for term vectors, because they do not redundantly store the byte[] term directly and instead reference the byte[] term already stored by the postings BytesRefHash. See add(int textStart) in TermsHashPerField.
|
|
ByteStart ( int bytesID ) : int |
Returns the bytesStart offset into the internally used ByteBlockPool for the given bytesID
|
|
BytesRefHash ( ) : System |
Creates a new BytesRefHash with a ByteBlockPool using a DirectAllocator.
|
|
BytesRefHash ( Lucene.Net.Util.ByteBlockPool pool ) : System |
Creates a new BytesRefHash
|
|
BytesRefHash ( Lucene.Net.Util.ByteBlockPool pool, int capacity, BytesStartArray bytesStartArray ) : System |
Creates a new BytesRefHash
|
|
Clear ( ) : void | ||
Clear ( bool resetPool ) : void |
Clears the BytesRef which maps to the given BytesRef
|
|
Close ( ) : void |
Closes the BytesRefHash and releases all internally used memory
|
|
Compact ( ) : int[] |
Returns the ids array in arbitrary order. Valid ids 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.
|
|
Find ( BytesRef bytes ) : int |
Returns the id of the given BytesRef.
|
|
Get ( int bytesID, BytesRef @ref ) : BytesRef |
Populates and returns a BytesRef with the bytes for the given bytesID. Note: the given bytesID must be a positive integer less than the current size (#size())
|
|
Reinit ( ) : void |
reinitializes the BytesRefHash after a previous #clear() call. If #clear() has not been called previously this method has no effect.
|
|
Size ( ) : int |
Returns the number of BytesRef values in this BytesRefHash.
|
|
Sort ( IComparer |
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.
|
Method | Description | |
---|---|---|
DoHash ( byte bytes, int offset, int length ) : int | ||
Equals ( int id, BytesRef b ) : bool | ||
FindHash ( BytesRef bytes ) : int | ||
Rehash ( int newSize, bool hashOnData ) : void |
Called when hash is too small (> 50% occupied) or too large (< 20% occupied).
|
|
Shrink ( int targetSize ) : bool |
public Add ( BytesRef bytes ) : int | ||
bytes | BytesRef | /// the bytes to hash |
return | int |
public ByteStart ( int bytesID ) : int | ||
bytesID | int | /// the id to look up |
return | int |
public BytesRefHash ( Lucene.Net.Util.ByteBlockPool pool ) : System | ||
pool | Lucene.Net.Util.ByteBlockPool | |
return | System |
public BytesRefHash ( Lucene.Net.Util.ByteBlockPool pool, int capacity, BytesStartArray bytesStartArray ) : System | ||
pool | Lucene.Net.Util.ByteBlockPool | |
capacity | int | |
bytesStartArray | BytesStartArray | |
return | System |
public Find ( BytesRef bytes ) : int | ||
bytes | BytesRef | /// the bytes to look for /// |
return | int |
public Get ( int bytesID, BytesRef @ref ) : BytesRef | ||
bytesID | int | /// the id |
@ref | BytesRef | |
return | BytesRef |
public Sort ( IComparer |
||
comp | IComparer |
/// the |
return | int[] |