
public class OLuceneIndexNotUnique extends OIndexAbstract<Set<OIdentifiable>> implements OLuceneIndex
OIndexAbstract.IndexConfiguration, OIndexAbstract.IndexTxSnapshotCONFIG_CLUSTERS, CONFIG_MAP_RID, configuration, indexId, keyLockManager, metadata, storage, type, valueContainerAlgorithmALGORITHM, CONFIG_AUTOMATIC, CONFIG_KEYTYPE, CONFIG_NAME, CONFIG_TYPE, INDEX_DEFINITION, INDEX_DEFINITION_CLASS, INDEX_VERSION, METADATA, VALUE_CONTAINER_ALGORITHMMERGE_KEYS| Constructor and Description |
|---|
OLuceneIndexNotUnique(String name,
String typeId,
String algorithm,
int version,
OAbstractPaginatedStorage storage,
String valueContainerAlgorithm,
ODocument metadata) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeUsedInEqualityOperators()
Indicates whether given index can be used to calculate result of
OQueryOperatorEquality operators. |
protected void |
clearSnapshot(OIndexAbstract.IndexTxSnapshot indexTxSnapshot) |
protected void |
commitSnapshot(Map<Object,Object> snapshot) |
OLuceneIndexNotUnique |
create(String name,
OIndexDefinition indexDefinition,
String clusterIndexName,
Set<String> clustersToIndex,
boolean rebuild,
OProgressListener progressListener)
Creates the index.
|
OIndexCursor |
cursor() |
protected Object |
decodeKey(Object key) |
OIndexCursor |
descCursor() |
protected OBinarySerializer |
determineValueSerializer() |
protected Object |
encodeKey(Object key) |
Set<OIdentifiable> |
get(Object key)
Gets the set of records associated with the passed key.
|
Object |
getCollatingValue(Object key) |
long |
getKeySize() |
long |
getSize() |
OLuceneTxChanges |
getTransactionChanges(OTransaction transaction) |
protected Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> |
interpretTxKeyChanges(OTransactionIndexChangesPerKey changes)
Interprets transaction index changes for a certain key.
|
OIndexCursor |
iterateEntries(Collection<?> keys,
boolean ascSortOrder)
Returns cursor which presents data associated with passed in keys.
|
OIndexCursor |
iterateEntriesBetween(Object fromKey,
boolean fromInclusive,
Object toKey,
boolean toInclusive,
boolean ascOrder)
Returns cursor which presents subset of index data between passed in keys.
|
OIndexCursor |
iterateEntriesMajor(Object fromKey,
boolean fromInclusive,
boolean ascOrder)
Returns cursor which presents subset of data which associated with key which is greater than passed in key.
|
OIndexCursor |
iterateEntriesMinor(Object toKey,
boolean toInclusive,
boolean ascOrder)
Returns cursor which presents subset of data which associated with key which is less than passed in key.
|
protected void |
onIndexEngineChange(int indexId) |
OLuceneIndexNotUnique |
put(Object key,
OIdentifiable singleValue)
Inserts a new entry in the index.
|
protected void |
putInSnapshot(Object key,
OIdentifiable value,
Map<Object,Object> snapshot) |
long |
rebuild(OProgressListener iProgressListener)
Populate the index with all the existent records.
|
boolean |
remove(Object key)
Removes an entry by its key.
|
boolean |
remove(Object key,
OIdentifiable value)
Removes an entry by its key and value.
|
protected void |
removeFromSnapshot(Object key,
OIdentifiable value,
Map<Object,Object> snapshot) |
org.apache.lucene.search.IndexSearcher |
searcher() |
boolean |
supportsOrderedIterations() |
acquireAtomicExclusiveLock, acquireExclusiveLock, acquireSharedLock, addCluster, addTxOperation, checkEntry, clear, close, commit, compareTo, contains, count, create, delete, doReloadIndexEngine, equals, flush, getAlgorithm, getClusters, getConfiguration, getDatabase, getDatabaseName, getDefinition, getEngineProperties, getFirstKey, getIndexId, getIndexNameByKey, getInternal, getKeyTypes, getLastKey, getMetadata, getName, getRebuildVersion, getType, getVersion, hashCode, hasRangeQuerySupport, indexCluster, indexConfigurationInstance, isAutomatic, isRebuilding, isUnique, keyCursor, loadFromConfiguration, loadMetadata, loadMetadataInternal, lockKeysForUpdate, lockKeysForUpdate, onShutdown, onStartup, populateIndex, postCommit, preCommit, rebuild, releaseExclusiveLock, releaseKeysForUpdate, releaseSharedLock, removeCluster, removeFromSnapshot, setRebuildingFlag, setType, toString, updateConfigurationpublic long rebuild(OProgressListener iProgressListener)
OIndexAbstractrebuild in interface OIndex<Set<OIdentifiable>>rebuild in class OIndexAbstract<Set<OIdentifiable>>OIndex.getRebuildVersion()public boolean remove(Object key, OIdentifiable value)
OIndexremove in interface OIndex<Set<OIdentifiable>>remove in class OIndexAbstract<Set<OIdentifiable>>key - The entry's key to removepublic boolean remove(Object key)
OIndexremove in interface OIndex<Set<OIdentifiable>>remove in class OIndexAbstract<Set<OIdentifiable>>key - The entry's key to removeprotected OBinarySerializer determineValueSerializer()
determineValueSerializer in class OIndexAbstract<Set<OIdentifiable>>protected Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> interpretTxKeyChanges(OTransactionIndexChangesPerKey changes)
OIndexAbstractORecordDuplicatedException while applying index changes.interpretTxKeyChanges in class OIndexAbstract<Set<OIdentifiable>>changes - the changes to interpret.public Object getCollatingValue(Object key)
getCollatingValue in interface OIndexInternal<Set<OIdentifiable>>getCollatingValue in class OIndexAbstract<Set<OIdentifiable>>protected void commitSnapshot(Map<Object,Object> snapshot)
commitSnapshot in class OIndexAbstract<Set<OIdentifiable>>protected void putInSnapshot(Object key, OIdentifiable value, Map<Object,Object> snapshot)
putInSnapshot in class OIndexAbstract<Set<OIdentifiable>>protected void removeFromSnapshot(Object key, OIdentifiable value, Map<Object,Object> snapshot)
removeFromSnapshot in class OIndexAbstract<Set<OIdentifiable>>protected void clearSnapshot(OIndexAbstract.IndexTxSnapshot indexTxSnapshot)
clearSnapshot in class OIndexAbstract<Set<OIdentifiable>>protected void onIndexEngineChange(int indexId)
onIndexEngineChange in class OIndexAbstract<Set<OIdentifiable>>public OLuceneTxChanges getTransactionChanges(OTransaction transaction)
public OLuceneIndexNotUnique create(String name, OIndexDefinition indexDefinition, String clusterIndexName, Set<String> clustersToIndex, boolean rebuild, OProgressListener progressListener)
OIndexcreate in interface OIndex<Set<OIdentifiable>>clusterIndexName - Cluster name where to place the TreeMappublic Set<OIdentifiable> get(Object key)
OIndexget in interface OIndex<Set<OIdentifiable>>key - The key to searchpublic OLuceneIndexNotUnique put(Object key, OIdentifiable singleValue)
OIndexput in interface OIndex<Set<OIdentifiable>>key - Entry's keysingleValue - Entry's value as OIdentifiable instancepublic long getSize()
getSize in interface OIndex<Set<OIdentifiable>>public long getKeySize()
getKeySize in interface OIndex<Set<OIdentifiable>>public OIndexCursor iterateEntries(Collection<?> keys, boolean ascSortOrder)
OIndexiterateEntries in interface OIndex<Set<OIdentifiable>>keys - Keys data of which should be returned.ascSortOrder - Flag which determines whether data iterated by cursor should be in ascending or descending order.public OIndexCursor iterateEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder)
OIndexiterateEntriesBetween in interface OIndex<Set<OIdentifiable>>fromKey - Lower border of index data.fromInclusive - Indicates whether lower border should be inclusive or exclusive.toKey - Upper border of index data.toInclusive - Indicates whether upper border should be inclusive or exclusive.ascOrder - Flag which determines whether data iterated by cursor should be in ascending or descending order.public OIndexCursor iterateEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder)
OIndexiterateEntriesMajor in interface OIndex<Set<OIdentifiable>>fromKey - Lower border of index data.fromInclusive - Indicates whether lower border should be inclusive or exclusive.ascOrder - Flag which determines whether data iterated by cursor should be in ascending or descending order.public OIndexCursor iterateEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder)
OIndexiterateEntriesMinor in interface OIndex<Set<OIdentifiable>>toKey - Upper border of index data.toInclusive - Indicates Indicates whether upper border should be inclusive or exclusive.ascOrder - Flag which determines whether data iterated by cursor should be in ascending or descending order.public OIndexCursor cursor()
cursor in interface OIndex<Set<OIdentifiable>>public OIndexCursor descCursor()
descCursor in interface OIndex<Set<OIdentifiable>>public boolean supportsOrderedIterations()
supportsOrderedIterations in interface OIndex<Set<OIdentifiable>>public org.apache.lucene.search.IndexSearcher searcher()
throws IOException
searcher in interface OLuceneIndexIOExceptionpublic boolean canBeUsedInEqualityOperators()
OIndexInternalOQueryOperatorEquality operators.canBeUsedInEqualityOperators in interface OIndexInternal<Set<OIdentifiable>>true if given index can be used to calculate result of
OQueryOperatorEquality operators.Copyright © 2009–2025 OrientDB. All rights reserved.