
public class OLuceneIndexNotUnique extends OIndexAbstract<Set<OIdentifiable>> implements OLuceneIndex
OIndexAbstract.IndexConfiguration, OIndexAbstract.IndexTxSnapshotapiVersion, binaryFormatVersion, clustersToIndex, CONFIG_MAP_RID, indexId, metadata, storage, 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,
int binaryFormatVersion) |
| 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() |
void |
doPut(OAbstractPaginatedStorage storage,
Object key,
ORID rid) |
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() |
Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> |
interpretTxKeyChanges(OTransactionIndexChangesPerKey changes)
Interprets transaction index changes for a certain key.
|
boolean |
isNativeTxSupported() |
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.
|
OIndexAbstract<Set<OIdentifiable>> |
removeCluster(String iClusterName)
Remove given cluster from the list of clusters that should be automatically indexed.
|
protected void |
removeFromSnapshot(Object key,
OIdentifiable value,
Map<Object,Object> snapshot) |
org.apache.lucene.search.IndexSearcher |
searcher() |
boolean |
supportsOrderedIterations() |
acquireAtomicExclusiveLock, acquireExclusiveLock, acquireSharedLock, addCluster, addTxOperation, clear, close, commit, compareTo, contains, count, create, delete, doReloadIndexEngine, doRemove, doRemove, equals, flush, getAlgorithm, getClusters, getConfiguration, getDatabase, getDatabaseName, getDefinition, getFirstKey, getIndexId, getIndexNameByKey, getInternal, getKeyTypes, getLastKey, getMetadata, getName, getRebuildVersion, getType, getVersion, hashCode, hasRangeQuerySupport, isAutomatic, isRebuilding, isUnique, keyCursor, loadFromConfiguration, loadMetadata, loadMetadataInternal, postCommit, rebuild, releaseExclusiveLock, releaseSharedLock, 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 isNativeTxSupported()
isNativeTxSupported in interface OIndexInternal<Set<OIdentifiable>>public void doPut(OAbstractPaginatedStorage storage, Object key, ORID rid) throws OInvalidIndexEngineIdException
doPut in interface OIndexInternal<Set<OIdentifiable>>OInvalidIndexEngineIdExceptionpublic boolean remove(Object key)
OIndexremove in interface OIndex<Set<OIdentifiable>>remove in class OIndexAbstract<Set<OIdentifiable>>key - The entry's key to removepublic OIndexAbstract<Set<OIdentifiable>> removeCluster(String iClusterName)
OIndexInternalremoveCluster in interface OIndexInternal<Set<OIdentifiable>>removeCluster in class OIndexAbstract<Set<OIdentifiable>>iClusterName - Cluster to remove.protected OBinarySerializer determineValueSerializer()
determineValueSerializer in class OIndexAbstract<Set<OIdentifiable>>public Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> interpretTxKeyChanges(OTransactionIndexChangesPerKey changes)
OIndexAbstractORecordDuplicatedException while applying index
changes.interpretTxKeyChanges in interface OIndexInternal<Set<OIdentifiable>>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 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()
searcher in interface OLuceneIndexpublic 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.