public class OLuceneIndexNotUnique extends OIndexAbstract implements OLuceneIndex
OIndexAbstract.IndexConfiguration, OIndexAbstract.IndexTxSnapshot
apiVersion, binaryFormatVersion, clustersToIndex, CONFIG_MAP_RID, configuration, indexId, metadata, storage, type, valueContainerAlgorithm
ALGORITHM, CONFIG_AUTOMATIC, CONFIG_KEYTYPE, CONFIG_NAME, CONFIG_TYPE, INDEX_DEFINITION, INDEX_DEFINITION_CLASS, INDEX_VERSION, METADATA, VALUE_CONTAINER_ALGORITHM
MERGE_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) |
protected Object |
decodeKey(Object key) |
OLuceneIndexNotUnique |
delete()
Delete the index.
|
Stream<ORawPair<Object,ORID>> |
descStream() |
protected OBinarySerializer |
determineValueSerializer() |
void |
doPut(OAbstractPaginatedStorage storage,
Object key,
ORID rid) |
protected Object |
encodeKey(Object key) |
Collection<OIdentifiable> |
get(Object key)
Deprecated.
|
Object |
getCollatingValue(Object key) |
Stream<ORID> |
getRids(Object key) |
Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> |
interpretTxKeyChanges(OTransactionIndexChangesPerKey changes)
Interprets transaction index changes for a certain key.
|
boolean |
isNativeTxSupported() |
protected void |
onIndexEngineChange(int indexId) |
OLuceneIndexNotUnique |
put(Object key,
OIdentifiable value)
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 rid)
Removes an entry by its key and value.
|
OIndexAbstract |
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() |
long |
size() |
Stream<ORawPair<Object,ORID>> |
stream() |
Stream<ORawPair<Object,ORID>> |
streamEntries(Collection<?> keys,
boolean ascSortOrder)
Returns stream which presents data associated with passed in keys.
|
Stream<ORawPair<Object,ORID>> |
streamEntriesBetween(Object fromKey,
boolean fromInclusive,
Object toKey,
boolean toInclusive,
boolean ascOrder)
Returns stream which presents subset of index data between passed in keys.
|
Stream<ORawPair<Object,ORID>> |
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.
|
Stream<ORawPair<Object,ORID>> |
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.
|
boolean |
supportsOrderedIterations() |
acquireAtomicExclusiveLock, acquireExclusiveLock, acquireSharedLock, addCluster, addTxOperation, clear, close, commit, compareTo, count, create, cursor, descCursor, doReloadIndexEngine, doRemove, doRemove, 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, loadMetadataInternal, manualIndexesWarning, postCommit, preCommit, rebuild, releaseExclusiveLock, releaseSharedLock, setType, toString, updateConfiguration
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isLabelSecurityDefined, isReadRestrictedBySecurityPolicy, securityFilterOnRead, securityFilterOnRead
public long rebuild(OProgressListener iProgressListener)
OIndexAbstract
rebuild
in interface OIndex
rebuild
in class OIndexAbstract
public boolean remove(Object key, OIdentifiable rid)
OIndex
remove
in interface OIndex
remove
in class OIndexAbstract
key
- The entry's key to removepublic boolean remove(Object key)
OIndex
remove
in interface OIndex
remove
in class OIndexAbstract
key
- The entry's key to removepublic OIndexAbstract removeCluster(String iClusterName)
OIndexInternal
removeCluster
in interface OIndexInternal
removeCluster
in class OIndexAbstract
iClusterName
- Cluster to remove.protected OBinarySerializer determineValueSerializer()
determineValueSerializer
in class OIndexAbstract
public Iterable<OTransactionIndexChangesPerKey.OTransactionIndexEntry> interpretTxKeyChanges(OTransactionIndexChangesPerKey changes)
OIndexAbstract
ORecordDuplicatedException
while applying index
changes.interpretTxKeyChanges
in interface OIndexInternal
interpretTxKeyChanges
in class OIndexAbstract
changes
- the changes to interpret.public void doPut(OAbstractPaginatedStorage storage, Object key, ORID rid)
doPut
in interface OIndexInternal
public Object getCollatingValue(Object key)
getCollatingValue
in interface OIndexInternal
getCollatingValue
in class OIndexAbstract
protected void commitSnapshot(Map<Object,Object> snapshot)
commitSnapshot
in class OIndexAbstract
public OLuceneIndexNotUnique delete()
OIndex
delete
in interface OIndex
delete
in class OIndexAbstract
protected void putInSnapshot(Object key, OIdentifiable value, Map<Object,Object> snapshot)
putInSnapshot
in class OIndexAbstract
protected void removeFromSnapshot(Object key, OIdentifiable value, Map<Object,Object> snapshot)
removeFromSnapshot
in class OIndexAbstract
protected void clearSnapshot(OIndexAbstract.IndexTxSnapshot indexTxSnapshot)
clearSnapshot
in class OIndexAbstract
protected void onIndexEngineChange(int indexId)
onIndexEngineChange
in class OIndexAbstract
public OLuceneIndexNotUnique create(String name, OIndexDefinition indexDefinition, String clusterIndexName, Set<String> clustersToIndex, boolean rebuild, OProgressListener progressListener)
@Deprecated public Collection<OIdentifiable> get(Object key)
OIndex
public Stream<ORID> getRids(Object key)
getRids
in interface OIndexInternal
public OLuceneIndexNotUnique put(Object key, OIdentifiable value)
OIndex
public long size()
size
in interface OIndexInternal
public Stream<ORawPair<Object,ORID>> streamEntries(Collection<?> keys, boolean ascSortOrder)
OIndexInternal
streamEntries
in interface OIndexInternal
keys
- Keys data of which should be returned.ascSortOrder
- Flag which determines whether data iterated by stream should be in
ascending or descending order.public Stream<ORawPair<Object,ORID>> streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder)
OIndexInternal
streamEntriesBetween
in interface OIndexInternal
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.public Stream<ORawPair<Object,ORID>> streamEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder)
OIndexInternal
streamEntriesMajor
in interface OIndexInternal
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.public Stream<ORawPair<Object,ORID>> streamEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder)
OIndexInternal
streamEntriesMinor
in interface OIndexInternal
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.public boolean isNativeTxSupported()
isNativeTxSupported
in interface OIndexInternal
public Stream<ORawPair<Object,ORID>> stream()
stream
in interface OIndexInternal
public Stream<ORawPair<Object,ORID>> descStream()
descStream
in interface OIndexInternal
public boolean supportsOrderedIterations()
supportsOrderedIterations
in interface OIndex
public org.apache.lucene.search.IndexSearcher searcher()
searcher
in interface OLuceneIndex
public boolean canBeUsedInEqualityOperators()
OIndexInternal
OQueryOperatorEquality
operators.canBeUsedInEqualityOperators
in interface OIndexInternal
true
if given index can be used to calculate result of OQueryOperatorEquality
operators.Copyright © 2009–2020 OrientDB. All rights reserved.