
public abstract class OLuceneIndexEngineAbstract extends OSharedResourceAdaptiveExternal implements OLuceneIndexEngine
OBaseIndexEngine.Validator<K,V>, OBaseIndexEngine.ValuesTransformer| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Boolean> |
collectionFields |
protected OIndexDefinition |
indexDefinition |
static String |
KEY |
protected ODocument |
metadata |
protected String |
name |
static String |
RID |
protected org.apache.lucene.util.Version |
version |
VERSION| Constructor and Description |
|---|
OLuceneIndexEngineAbstract(int id,
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,
Map<String,String> engineProperties,
OEncryption encryption) |
protected abstract org.apache.lucene.index.IndexWriter |
createIndexWriter(org.apache.lucene.store.Directory directory) |
void |
delete(OAtomicOperation atomicOperation) |
org.apache.lucene.search.Query |
deleteQuery(Object key,
OIdentifiable value) |
Stream<ORawPair<Object,ORID>> |
descStream(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 static ODatabaseDocumentInternal |
getDatabase() |
int |
getId() |
String |
getIndexNameByKey(Object key) |
String |
getName() |
org.apache.lucene.analysis.Analyzer |
indexAnalyzer() |
String |
indexName() |
void |
init(String indexName,
String indexType,
OIndexDefinition indexDefinition,
boolean isAutomatic,
ODocument metadata) |
boolean |
isCollectionIndex() |
Stream<Object> |
keyStream() |
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() |
protected void |
openIfClosed(OStorage storage) |
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) |
Stream<ORawPair<Object,ORID>> |
stream(OBaseIndexEngine.ValuesTransformer valuesTransformer) |
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, getInTxget, getEngineAPIVersion, put, remove, update, validatedPuthasRangeQuerySupport, iterateEntriesBetween, iterateEntriesMajor, iterateEntriesMinorpublic static final String RID
public static final String KEY
protected OIndexDefinition indexDefinition
protected String name
protected ODocument metadata
protected org.apache.lucene.util.Version version
public int getId()
getId in interface OBaseIndexEngineprotected 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 static 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, Map<String,String> engineProperties, 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(OStorage storage)
protected 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 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 Stream<ORawPair<Object,ORID>> descStream(OBaseIndexEngine.ValuesTransformer valuesTransformer)
descStream in interface OBaseIndexEnginepublic Stream<ORawPair<Object,ORID>> stream(OBaseIndexEngine.ValuesTransformer valuesTransformer)
stream in interface OBaseIndexEnginepublic Stream<Object> keyStream()
keyStream in interface OBaseIndexEnginepublic long size(OBaseIndexEngine.ValuesTransformer transformer)
size in interface OBaseIndexEnginepublic void release(org.apache.lucene.search.IndexSearcher searcher)
release in interface OLuceneIndexEnginepublic String getName()
getName in interface OBaseIndexEnginepublic boolean acquireAtomicExclusiveLock(Object key)
OBaseIndexEngine
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.