Class OLuceneIndexNotUnique
java.lang.Object
com.orientechnologies.orient.core.index.OIndexAbstract
com.orientechnologies.lucene.index.OLuceneIndexNotUnique
- All Implemented Interfaces:
OLuceneIndex,OIndex,OIndexInternal,Comparable<OIndex>
- Direct Known Subclasses:
OLuceneFullTextIndex,OLuceneSpatialIndex
-
Nested Class Summary
Nested classes/interfaces inherited from class com.orientechnologies.orient.core.index.OIndexAbstract
OIndexAbstract.PartialSearchMode -
Field Summary
Fields inherited from class com.orientechnologies.orient.core.index.OIndexAbstract
apiVersion, CONFIG_MAP_RID, im, indexId, storageFields inherited from interface com.orientechnologies.orient.core.index.OIndexInternal
ALGORITHM, CONFIG_AUTOMATIC, CONFIG_KEYTYPE, CONFIG_NAME, CONFIG_TYPE, INDEX_DEFINITION, INDEX_DEFINITION_CLASS, INDEX_VERSION, MERGE_KEYS, METADATA, VALUE_CONTAINER_ALGORITHM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected ObjectvoiddoDelete()protected ObjectDeprecated.getCollatingValue(Object key) getRidsIgnoreTx(Object key) Interprets transaction index changes for a certain key.booleanprotected voidpopulateIndex(ODocument doc, Object fieldValue) put(Object key, OIdentifiable value) Inserts a new entry in the index.longrebuild(OProgressListener iProgressListener) Populate the index with all the existent records.booleanRemoves an entry by its key.booleanremove(Object key, OIdentifiable rid) Removes an entry by its key and value.removeCluster(String iClusterName) Remove given cluster from the list of clusters that should be automatically indexed.org.apache.lucene.search.IndexSearchersearcher()longsize()stream()streamEntries(Collection<?> keys, boolean ascSortOrder) Returns stream which presents data associated with passed in keys.streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder) Returns stream which presents subset of index data between passed in keys.streamEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder) Returns stream which presents subset of data which associated with key which is greater than passed in key.streamEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder) Returns stream which presents subset of data which associated with key which is less than passed in key.booleanMethods inherited from class com.orientechnologies.orient.core.index.OIndexAbstract
acquireAtomicExclusiveLock, acquireExclusiveLock, acquireSharedLock, addCluster, clear, close, compareTo, count, create, cursor, delete, descCursor, doReloadIndexEngine, enhanceFromCompositeKeyBetweenAsc, enhanceFromCompositeKeyBetweenDesc, enhanceToCompositeKeyBetweenAsc, enhanceToCompositeKeyBetweenDesc, equals, flush, getAlgorithm, getClusters, getConfiguration, getDatabase, getDatabaseName, getDefinition, getFirstKey, getIndexId, getIndexNameByKey, getInternal, getKeySize, getKeyTypes, getLastKey, getMetadata, getName, getRebuildVersion, getSize, getType, getVersion, hashCode, hasRangeQuerySupport, isAutomatic, isRebuilding, isUnique, iterateEntries, iterateEntriesBetween, iterateEntriesMajor, iterateEntriesMinor, keyCursor, keyStream, loadFromConfiguration, loadMetadata, loadMetadataFromDoc, loadMetadataInternal, manualIndexesWarning, rebuild, releaseExclusiveLock, releaseSharedLock, toString, updateConfiguration
-
Constructor Details
-
OLuceneIndexNotUnique
-
-
Method Details
-
rebuild
Description copied from class:OIndexAbstractPopulate the index with all the existent records.- Specified by:
rebuildin interfaceOIndex- Overrides:
rebuildin classOIndexAbstract
-
remove
Description copied from interface:OIndexRemoves an entry by its key and value.- Specified by:
removein interfaceOIndex- Overrides:
removein classOIndexAbstract- Parameters:
key- The entry's key to remove- Returns:
- True if the entry has been found and removed, otherwise false
-
remove
Description copied from interface:OIndexRemoves an entry by its key.- Specified by:
removein interfaceOIndex- Overrides:
removein classOIndexAbstract- Parameters:
key- The entry's key to remove- Returns:
- True if the entry has been found and removed, otherwise false
-
removeCluster
Description copied from interface:OIndexInternalRemove given cluster from the list of clusters that should be automatically indexed.- Specified by:
removeClusterin interfaceOIndexInternal- Overrides:
removeClusterin classOIndexAbstract- Parameters:
iClusterName- Cluster to remove.- Returns:
- Current index instance.
-
interpretTxKeyChanges
public Iterable<OStorageTransactionIndexChange> interpretTxKeyChanges(OTransactionIndexChangesPerKey changes) Description copied from class:OIndexAbstractInterprets transaction index changes for a certain key. Override it to customize index behaviour on interpreting index changes. This may be viewed as an optimization, but in some cases this is a requirement. For example, if you put multiple values under the same key during the transaction for single-valued/unique index, but remove all of them except one before commit, there is no point in throwingORecordDuplicatedExceptionwhile applying index changes.- Specified by:
interpretTxKeyChangesin interfaceOIndexInternal- Overrides:
interpretTxKeyChangesin classOIndexAbstract- Parameters:
changes- the changes to interpret.- Returns:
- the interpreted index key changes.
-
getCollatingValue
- Specified by:
getCollatingValuein interfaceOIndexInternal- Overrides:
getCollatingValuein classOIndexAbstract
-
doDelete
public void doDelete()- Overrides:
doDeletein classOIndexAbstract
-
decodeKey
-
populateIndex
-
encodeKey
-
get
Deprecated.Description copied from interface:OIndexGets the set of records associated with the passed key. -
getRidsIgnoreTx
- Specified by:
getRidsIgnoreTxin interfaceOIndexInternal
-
getRids
- Specified by:
getRidsin interfaceOIndexInternal
-
put
Description copied from interface:OIndexInserts a new entry in the index. The behaviour depends by the index implementation. -
size
public long size()- Specified by:
sizein interfaceOIndexInternal- Returns:
- number of entries in the index.
-
streamEntries
Description copied from interface:OIndexInternalReturns stream which presents data associated with passed in keys.- Specified by:
streamEntriesin interfaceOIndexInternal- Parameters:
keys- Keys data of which should be returned.ascSortOrder- Flag which determines whether data iterated by stream should be in ascending or descending order.- Returns:
- stream which presents data associated with passed in keys.
-
streamEntriesBetween
public Stream<ORawPair<Object,ORID>> streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder) Description copied from interface:OIndexInternalReturns stream which presents subset of index data between passed in keys.- Specified by:
streamEntriesBetweenin interfaceOIndexInternal- Parameters:
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 stream should be in ascending or descending order.- Returns:
- Cursor which presents subset of index data between passed in keys.
-
streamEntriesMajor
public Stream<ORawPair<Object,ORID>> streamEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder) Description copied from interface:OIndexInternalReturns stream which presents subset of data which associated with key which is greater than passed in key.- Specified by:
streamEntriesMajorin interfaceOIndexInternal- Parameters:
fromKey- Lower border of index data.fromInclusive- Indicates whether lower border should be inclusive or exclusive.ascOrder- Flag which determines whether data iterated by stream should be in ascending or descending order.- Returns:
- stream which presents subset of data which associated with key which is greater than passed in key.
-
streamEntriesMinor
public Stream<ORawPair<Object,ORID>> streamEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder) Description copied from interface:OIndexInternalReturns stream which presents subset of data which associated with key which is less than passed in key.- Specified by:
streamEntriesMinorin interfaceOIndexInternal- Parameters:
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 stream should be in ascending or descending order.- Returns:
- stream which presents subset of data which associated with key which is less than passed in key.
-
isNativeTxSupported
public boolean isNativeTxSupported()- Specified by:
isNativeTxSupportedin interfaceOIndexInternal
-
stream
- Specified by:
streamin interfaceOIndexInternal
-
descStream
- Specified by:
descStreamin interfaceOIndexInternal
-
supportsOrderedIterations
public boolean supportsOrderedIterations()- Specified by:
supportsOrderedIterationsin interfaceOIndex
-
searcher
public org.apache.lucene.search.IndexSearcher searcher()- Specified by:
searcherin interfaceOLuceneIndex
-
canBeUsedInEqualityOperators
public boolean canBeUsedInEqualityOperators()- Specified by:
canBeUsedInEqualityOperatorsin interfaceOIndexInternal
-