public abstract class OracleTextAutoIndex<T extends org.apache.tinkerpop.gremlin.structure.Element> extends java.lang.Object implements OracleAutoIndex<T>
OracleIndex.SEARCH_ENGINE
EDGE_ID_PROP, EDGE_LABEL_PROP, END_NODE_ID_PROP, m_dtValues, START_NODE_ID_PROP, TYPE_DT_BOOL, TYPE_DT_BYTE, TYPE_DT_CHAR, TYPE_DT_DATE, TYPE_DT_DOUBLE, TYPE_DT_FLOAT, TYPE_DT_INTEGER, TYPE_DT_JSON, TYPE_DT_LONG, TYPE_DT_SERIALIZABLE, TYPE_DT_SHORT, TYPE_DT_SPATIAL, TYPE_DT_STRING, TYPE_DT_URI, VERTEX_ID_PROP, VERTEX_LABEL_PROP
Constructor and Description |
---|
OracleTextAutoIndex(java.lang.String indexName, java.lang.Class<T> indexClass, OraclePropertyGraphBase oraclePropertyGraph, Parameter[] indexParameters, boolean clear)
Constructs a new OracleTextAutoIndex object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildSearchTerm(java.lang.String key, java.lang.Object value)
Builds a search term query expression in the syntax required by this index.
|
java.lang.String |
buildSearchTerm(java.lang.String key, java.lang.Object value, java.lang.Class dtClass)
Builds a search term query expression in the syntax required by this index.
|
void |
clearIndex()
Clears all data stored in the text index.
|
void |
close()
Closes this index object.
|
boolean |
containsIndexedKey(java.lang.String key)
Verifies if the given key is already indexed using this automatic index.
|
long |
count(java.lang.String key, java.lang.Object value)
Counts all the matching elements that have a particular key/value property within the index
|
long |
count(java.lang.String key, java.lang.Object value, boolean acceptWildcard)
Counts all the matching elements that have a particular key/value property within the index
|
org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> |
get(java.lang.String key, java.lang.Object value)
Gets an Iterator object with all the matching elements that have a particular key/value property within the index
|
org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> |
get(java.lang.String key, java.lang.Object value, boolean acceptWildcard)
Gets an Iterator object with all the matching elements that have a particular key/value property within the index
|
java.lang.String |
getGraphName()
Get the name of the associated graph
|
java.lang.Class<T> |
getIndexClass()
Gets the class associated to this index
|
java.lang.String |
getIndexName()
Gets the name of this index instance.
|
OracleTextParameters |
getIndexParameters()
Gets the index parameters associated to this index.
|
OracleIndexParameters |
getOracleIndexParameters()
Gets the OracleIndexParameters associated to this index
|
Parameter<java.lang.String,java.lang.Object>[] |
getParameters()
Gets the Parameters associated to this index.
|
org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T>[] |
getPartitioned(java.lang.Object[] connections, java.lang.String key, java.lang.Object value, boolean acceptWildcard, int startShardId)
Gets an array of
CloseableIterator objects that hold all the elements with an attribute matching the given K/V pair. |
OracleIndex.SEARCH_ENGINE |
getSearchEngine()
Gets the search engine used by this OracleIndex object
|
org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> |
query(java.lang.String key, java.lang.Object value)
Query for all the elements satisfying the specified K/V property within the index
|
org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> |
query(java.lang.String key, java.lang.Object value, boolean useWildcards)
Query for all the elements satisfying the specified K/V property within the index
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIndexedKeys, indexElements, reindexElements, reindexElementsPartitioned
add, commit, count, dropIndex, get, get, getDirectoryName, getDocIdentifier, getPartitioned, getPartitioned, getTotalShards, put, remove, remove, removeAll
public OracleTextAutoIndex(java.lang.String indexName, java.lang.Class<T> indexClass, OraclePropertyGraphBase oraclePropertyGraph, Parameter[] indexParameters, boolean clear)
indexName
- the name of the indexindexClass
- the element class that this index is indexing (can be base class)oraclePropertyGraph
- an OraclePropertyGraphBase
object.indexParameters
- a collection of parameters for the underlying index implementation.clear
- a boolean specifying if the index should be cleared at the beginning.public final java.lang.String buildSearchTerm(java.lang.String key, java.lang.Object value)
buildSearchTerm
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the key of the K/V propertyvalue
- the value object of the K/V propertypublic final java.lang.String buildSearchTerm(java.lang.String key, java.lang.Object value, java.lang.Class dtClass)
buildSearchTerm
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the key of the K/V propertyvalue
- the value object of the K/V propertydtClass
- the class representing the datatype of the property value. This can be used to cast the property value to a different datatype. For example, if the value is "3.01" and dtClass is Float.Class, then this value will be treated as a 3.01f.public void clearIndex()
clearIndex
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
public void close()
close
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
public boolean containsIndexedKey(java.lang.String key)
containsIndexedKey
in interface OracleAutoIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the key to validatepublic final long count(java.lang.String key, java.lang.Object value)
count
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.value
- the value object of the property. It can be NULL which will cause all elements with the given key to be returned.CloseableIterator
object.public final long count(java.lang.String key, java.lang.Object value, boolean acceptWildcard)
count
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.value
- the value object of the property. It can be NULL which will cause all elements with the given key to be returned.acceptWildcard
- specifies if wild cards can be used in the value object. the indexCloseableIterator
object.public final org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> get(java.lang.String key, java.lang.Object value)
get
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.value
- the value object of the property. It can be NULL which will cause all elements with the given key to be returned.CloseableIterator
object.public final org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> get(java.lang.String key, java.lang.Object value, boolean acceptWildcard)
get
in interface OracleAutoIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
get
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.value
- the value object of the property. It can be NULL which will cause all elements with the given key to be returned.acceptWildcard
- specifies if wild cards can be used in the value object. the indexCloseableIterator
object.public final java.lang.String getGraphName()
getGraphName
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
public final java.lang.Class<T> getIndexClass()
getIndexClass
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
public final java.lang.String getIndexName()
getIndexName
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
public OracleTextParameters getIndexParameters()
OracleTextParameters
object.public OracleIndexParameters getOracleIndexParameters()
getOracleIndexParameters
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
public Parameter<java.lang.String,java.lang.Object>[] getParameters()
getParameters
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
Parameter
array.public final org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T>[] getPartitioned(java.lang.Object[] connections, java.lang.String key, java.lang.Object value, boolean acceptWildcard, int startShardId)
CloseableIterator
objects that hold all the elements with an attribute matching the given K/V pair. Each element in the CloseableIterator
array uses a separate connection provided to fetch a subset of the results from an Oracle Text index.getPartitioned
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
connections
- an array of connections to the index. Each element of this array should be of type Oracle
.key
- the key of a propertyvalue
- the value object of the property.acceptWildcard
- specifies if wild cards can be used in the value object.startShardId
- the ID of the starting shard.CloseableIterator
object.public OracleIndex.SEARCH_ENGINE getSearchEngine()
getSearchEngine
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
public final org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> query(java.lang.String key, java.lang.Object value)
query
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.value
- the value object of the property. It can be NULL which will cause all elements with the given key to be returned.CloseableIterator
object.public final org.apache.tinkerpop.gremlin.structure.util.CloseableIterator<T> query(java.lang.String key, java.lang.Object value, boolean useWildcards)
query
in interface OracleIndex<T extends org.apache.tinkerpop.gremlin.structure.Element>
key
- the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.value
- the value object of the property. It can be NULL which will cause all elements with the given key to be returned.useWildcards
- specifies if wild cards can be used in the value object.CloseableIterator
object.Copyright © 2010, 2020 Oracle and/or its affiliates. All Rights Reserved.