
public abstract class OLuceneIndexEngineAbstract extends OSharedResourceAdaptiveExternal implements OLuceneIndexEngine
OBaseIndexEngine.Validator<K,V>, OBaseIndexEngine.ValuesTransformer| Modifier and Type | Field and Description |
|---|---|
static String |
KEY |
protected ODocument |
metadata |
protected String |
name |
static String |
RID |
protected org.apache.lucene.util.Version |
version |
VERSION| Constructor and Description |
|---|
OLuceneIndexEngineAbstract(OStorage storage,
String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireAtomicExclusiveLock(Object key)
Acquires exclusive lock in the active atomic operation running on the current thread for this index engine.
|
protected void |
addDocument(org.apache.lucene.document.Document doc) |
OLuceneTxChanges |
buildTxChanges() |
void |
clear(OAtomicOperation atomicOperation) |
void |
close() |
void |
create(OAtomicOperation atomicOperation,
OBinarySerializer valueSerializer,
boolean isAutomatic,
OType[] keyTypes,
boolean nullPointerSupport,
OBinarySerializer keySerializer,
int keySize,
Set<String> clustersToIndex,
Map<String,String> engineProperties,
ODocument metadata,
OEncryption encryption) |
protected abstract org.apache.lucene.index.IndexWriter |
createIndexWriter(org.apache.lucene.store.Directory directory) |
OIndexCursor |
cursor(OBaseIndexEngine.ValuesTransformer valuesTransformer) |
void |
delete(OAtomicOperation atomicOperation) |
org.apache.lucene.search.Query |
deleteQuery(Object key,
OIdentifiable value) |
void |
deleteWithoutLoad(OAtomicOperation atomicOperation,
String indexName) |
OIndexCursor |
descCursor(OBaseIndexEngine.ValuesTransformer valuesTransformer) |
void |
flush() |
void |
freeze(boolean throwException)
After this method finished it's execution, all threads that are going to perform data modifications in storage should wait till
OFreezableStorageComponent.release() method will be called. |
protected ODatabaseDocumentInternal |
getDatabase() |
String |
getIndexNameByKey(Object key) |
String |
getName() |
int |
getVersion() |
org.apache.lucene.analysis.Analyzer |
indexAnalyzer() |
String |
indexName() |
void |
init(String indexName,
String indexType,
OIndexDefinition indexDefinition,
boolean isAutomatic,
ODocument metadata) |
boolean |
isCollectionIndex() |
OIndexKeyCursor |
keyCursor() |
void |
load(String indexName,
OBinarySerializer valueSerializer,
boolean isAutomatic,
OBinarySerializer keySerializer,
OType[] keyTypes,
boolean nullPointerSupport,
int keySize,
Map<String,String> engineProperties,
OEncryption encryption) |
abstract void |
onRecordAddedToResultSet(OLuceneQueryContext queryContext,
OContextualRecordId recordId,
org.apache.lucene.document.Document ret,
org.apache.lucene.search.ScoreDoc score) |
protected void |
openIfClosed() |
org.apache.lucene.analysis.Analyzer |
queryAnalyzer() |
void |
release()
After this method finished execution all threads that are waiting to perform data modifications in storage will be awaken and
will be allowed to continue their execution.
|
void |
release(org.apache.lucene.search.IndexSearcher searcher) |
boolean |
remove(Object key,
OIdentifiable value) |
org.apache.lucene.search.IndexSearcher |
searcher() |
long |
size(OBaseIndexEngine.ValuesTransformer transformer) |
long |
sizeInTx(OLuceneTxChanges changes) |
protected void |
updateLastAccess() |
acquireExclusiveLock, acquireSharedLock, releaseExclusiveLock, releaseSharedLock, tryAcquireExclusiveLock, tryAcquireSharedLockaddUser, assertExclusiveLockHold, assertSharedLockHold, getUsers, isConcurrent, removeUserclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildDocument, buildQuery, getInTxgetEngineAPIVersion, put, update, validatedPutcontains, get, getFirstKey, getLastKey, hasRangeQuerySupport, iterateEntriesBetween, iterateEntriesMajor, iterateEntriesMinor, removepublic static final String RID
public static final String KEY
protected String name
protected ODocument metadata
protected org.apache.lucene.util.Version version
protected void updateLastAccess()
protected void addDocument(org.apache.lucene.document.Document doc)
public void init(String indexName, String indexType, OIndexDefinition indexDefinition, boolean isAutomatic, ODocument metadata)
init in interface OBaseIndexEngineprotected ODatabaseDocumentInternal getDatabase()
protected abstract org.apache.lucene.index.IndexWriter createIndexWriter(org.apache.lucene.store.Directory directory)
throws IOException
IOExceptionpublic void flush()
flush in interface OBaseIndexEnginepublic void create(OAtomicOperation atomicOperation, OBinarySerializer valueSerializer, boolean isAutomatic, OType[] keyTypes, boolean nullPointerSupport, OBinarySerializer keySerializer, int keySize, Set<String> clustersToIndex, Map<String,String> engineProperties, ODocument metadata, OEncryption encryption)
create in interface OBaseIndexEnginepublic void delete(OAtomicOperation atomicOperation)
delete in interface OBaseIndexEnginepublic String indexName()
indexName in interface OLuceneIndexEnginepublic abstract void onRecordAddedToResultSet(OLuceneQueryContext queryContext, OContextualRecordId recordId, org.apache.lucene.document.Document ret, org.apache.lucene.search.ScoreDoc score)
onRecordAddedToResultSet in interface OLuceneIndexEnginepublic org.apache.lucene.analysis.Analyzer indexAnalyzer()
indexAnalyzer in interface OLuceneIndexEnginepublic org.apache.lucene.analysis.Analyzer queryAnalyzer()
queryAnalyzer in interface OLuceneIndexEnginepublic boolean remove(Object key, OIdentifiable value)
remove in interface OLuceneIndexEngineprotected void openIfClosed()
public boolean isCollectionIndex()
isCollectionIndex in interface OLuceneIndexEnginepublic org.apache.lucene.search.IndexSearcher searcher()
searcher in interface OLuceneIndexEnginepublic long sizeInTx(OLuceneTxChanges changes)
sizeInTx in interface OLuceneIndexEnginepublic OLuceneTxChanges buildTxChanges() throws IOException
buildTxChanges in interface OLuceneIndexEngineIOExceptionpublic org.apache.lucene.search.Query deleteQuery(Object key, OIdentifiable value)
deleteQuery in interface OLuceneIndexEnginepublic void deleteWithoutLoad(OAtomicOperation atomicOperation, String indexName)
deleteWithoutLoad in interface OBaseIndexEnginepublic void load(String indexName, OBinarySerializer valueSerializer, boolean isAutomatic, OBinarySerializer keySerializer, OType[] keyTypes, boolean nullPointerSupport, int keySize, Map<String,String> engineProperties, OEncryption encryption)
load in interface OIndexEnginepublic void clear(OAtomicOperation atomicOperation)
clear in interface OBaseIndexEnginepublic void close()
close in interface OBaseIndexEnginepublic OIndexCursor descCursor(OBaseIndexEngine.ValuesTransformer valuesTransformer)
descCursor in interface OBaseIndexEnginepublic OIndexCursor cursor(OBaseIndexEngine.ValuesTransformer valuesTransformer)
cursor in interface OBaseIndexEnginepublic OIndexKeyCursor keyCursor()
keyCursor in interface OBaseIndexEnginepublic long size(OBaseIndexEngine.ValuesTransformer transformer)
size in interface OBaseIndexEnginepublic void release(org.apache.lucene.search.IndexSearcher searcher)
release in interface OLuceneIndexEnginepublic int getVersion()
getVersion in interface OBaseIndexEnginepublic String getName()
getName in interface OBaseIndexEnginepublic boolean acquireAtomicExclusiveLock(Object key)
OBaseIndexEngineAcquires exclusive lock in the active atomic operation running on the current thread for this index engine.
If this index engine supports a more narrow locking, for example key-based sharding, it may use the provided key to
infer a more narrow lock scope, but that is not a requirement.
acquireAtomicExclusiveLock in interface OBaseIndexEnginekey - the index key to lock.true if this index was locked entirely, false if this index locking is sensitive to the provided key and only some subset of this index was locked.public String getIndexNameByKey(Object key)
getIndexNameByKey in interface OBaseIndexEnginepublic void freeze(boolean throwException)
OFreezableStorageComponentOFreezableStorageComponent.release() method will be called. This method will wait till all ongoing modifications will be finished.freeze in interface OFreezableStorageComponentthrowException - If true OModificationOperationProhibitedException
exception will be thrown on call of methods that requires storage modification. Otherwise other threads
will wait for OFreezableStorageComponent.release() method call.public void release()
OFreezableStorageComponentrelease in interface OFreezableStorageComponentCopyright © 2009–2025 OrientDB. All rights reserved.