public abstract class OracleTextAutoIndex<T extends com.tinkerpop.blueprints.Element> extends java.lang.Object implements OracleAutoIndex<T>
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
Constructor and Description |
---|
OracleTextAutoIndex(java.lang.String indexName, java.lang.Class<T> indexClass, OraclePropertyGraphBase oraclePropertyGraph, com.tinkerpop.blueprints.Parameter[] indexParameters, boolean clear)
Constructs a new LuceneIndex 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
|
com.tinkerpop.blueprints.CloseableIterable<T> |
get(java.lang.String key, java.lang.Object value)
Gets an Iterable object with all the matching elements that have a particular key/value property within the index
|
com.tinkerpop.blueprints.CloseableIterable<T> |
get(java.lang.String key, java.lang.Object value, boolean acceptWildcard)
Gets an Iterable 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
|
com.tinkerpop.blueprints.Parameter<java.lang.String,java.lang.Object>[] |
getParameters()
Gets the Parameters associated to this index.
|
com.tinkerpop.blueprints.CloseableIterable<T>[] |
getPartitioned(java.lang.Object[] connections, java.lang.String key, java.lang.Object value, boolean acceptWildcard, int startShardId)
Gets an array of
CloseableIterable objects that hold all the elements with an attribute matching the given K/V pair. |
com.tinkerpop.blueprints.CloseableIterable<T> |
query(java.lang.String key, java.lang.Object value)
Query for all the elements satisfying the specified K/V property within the index
|
com.tinkerpop.blueprints.CloseableIterable<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, remove, removeAll
public OracleTextAutoIndex(java.lang.String indexName, java.lang.Class<T> indexClass, OraclePropertyGraphBase oraclePropertyGraph, com.tinkerpop.blueprints.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 com.tinkerpop.blueprints.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 com.tinkerpop.blueprints.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 com.tinkerpop.blueprints.Element>
public void close()
close
in interface OracleIndex<T extends com.tinkerpop.blueprints.Element>
public boolean containsIndexedKey(java.lang.String key)
containsIndexedKey
in interface OracleAutoIndex<T extends com.tinkerpop.blueprints.Element>
key
- the key to validatepublic final long count(java.lang.String key, java.lang.Object value)
count
in interface com.tinkerpop.blueprints.Index<T extends com.tinkerpop.blueprints.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.CloseableIterable
object.public final long count(java.lang.String key, java.lang.Object value, boolean acceptWildcard)
count
in interface OracleIndex<T extends com.tinkerpop.blueprints.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 indexCloseableIterable
object.public final com.tinkerpop.blueprints.CloseableIterable<T> get(java.lang.String key, java.lang.Object value)
get
in interface com.tinkerpop.blueprints.Index<T extends com.tinkerpop.blueprints.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.CloseableIterable
object.public final com.tinkerpop.blueprints.CloseableIterable<T> get(java.lang.String key, java.lang.Object value, boolean acceptWildcard)
get
in interface OracleAutoIndex<T extends com.tinkerpop.blueprints.Element>
get
in interface OracleIndex<T extends com.tinkerpop.blueprints.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 indexCloseableIterable
object.public final java.lang.String getGraphName()
getGraphName
in interface OracleIndex<T extends com.tinkerpop.blueprints.Element>
public final java.lang.Class<T> getIndexClass()
getIndexClass
in interface com.tinkerpop.blueprints.Index<T extends com.tinkerpop.blueprints.Element>
getIndexClass
in interface OracleIndex<T extends com.tinkerpop.blueprints.Element>
public final java.lang.String getIndexName()
getIndexName
in interface com.tinkerpop.blueprints.Index<T extends com.tinkerpop.blueprints.Element>
public OracleTextParameters getIndexParameters()
LuceneParameters
object.public OracleIndexParameters getOracleIndexParameters()
getOracleIndexParameters
in interface OracleIndex<T extends com.tinkerpop.blueprints.Element>
public com.tinkerpop.blueprints.Parameter<java.lang.String,java.lang.Object>[] getParameters()
getParameters
in interface OracleIndex<T extends com.tinkerpop.blueprints.Element>
Parameter
array.public final com.tinkerpop.blueprints.CloseableIterable<T>[] getPartitioned(java.lang.Object[] connections, java.lang.String key, java.lang.Object value, boolean acceptWildcard, int startShardId)
CloseableIterable
objects that hold all the elements with an attribute matching the given K/V pair. Each element in the CloseableIterable
array uses a separate connection provided to fetch a subset of the results from an Oracle Text index.getPartitioned
in interface OracleIndex<T extends com.tinkerpop.blueprints.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.CloseableIterable
object.public final com.tinkerpop.blueprints.CloseableIterable<T> query(java.lang.String key, java.lang.Object value)
query
in interface com.tinkerpop.blueprints.Index<T extends com.tinkerpop.blueprints.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.CloseableIterable
object.public final com.tinkerpop.blueprints.CloseableIterable<T> query(java.lang.String key, java.lang.Object value, boolean useWildcards)
query
in interface OracleIndex<T extends com.tinkerpop.blueprints.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.CloseableIterable
object.Copyright © 2017, 2018 Oracle and/or its affiliates. All Rights Reserved.