Class LiveFieldValues<S, T>
Tracks live field values across NRT reader reopens. This holds a map for all updated ids since the last reader reopen. Once the NRT reader is reopened, it prunes the map. This means you must reopen your NRT reader periodically otherwise the RAM consumption of this class will grow unbounded!
NOTE: you must ensure the same id is never updated at the same time by two threads, because in this case you cannot in general know which thread "won".
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class LiveFieldValues<S, T> : object, ReferenceManager.IRefreshListener, IDisposable where S : class
Type Parameters
Name | Description |
---|---|
S | |
T |
Constructors
Name | Description |
---|---|
LiveFieldValues(ReferenceManager<S>, T) |
Properties
Name | Description |
---|---|
Count | Returns the [approximate] number of id/value pairs buffered in RAM. NOTE: This was size() in Lucene. |
Methods
Name | Description |
---|---|
Add(String, T) | Call this after you've successfully added a document to the index, to record what value you just set the field to. |
AfterRefresh(Boolean) | |
BeforeRefresh() | |
Delete(String) | Call this after you've successfully deleted a document from the index. |
Dispose() | |
Get(String) | Returns the current value for this id, or |
LookupFromSearcher(S, String) | This is called when the id/value was already flushed & opened in an NRT IndexSearcher. You must implement this to go look up the value (eg, via doc values, field cache, stored fields, etc.). |