public abstract class OracleTextAutoIndex<T extends Element> extends 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(String indexName,
Class<T> indexClass,
OraclePropertyGraphBase oraclePropertyGraph,
Parameter[] indexParameters,
boolean clear)
Constructs a new LuceneIndex object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildSearchTerm(String key,
Object value)
Builds a search term query expression in the syntax required by this index.
|
String |
buildSearchTerm(String key,
Object value,
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(String key)
Verifies if the given key is already indexed using this automatic index.
|
long |
count(String key,
Object value)
Counts all the matching elements that have a particular key/value property within the index
|
long |
count(String key,
Object value,
boolean acceptWildcard)
Counts all the matching elements that have a particular key/value property within the index
|
CloseableIterable<T> |
get(String key,
Object value)
Gets an Iterable object with all the matching elements that have a particular key/value property within
the index
|
CloseableIterable<T> |
get(String key,
Object value,
boolean acceptWildcard)
Gets an Iterable object with all the matching elements that have a particular key/value property within
the index
|
String |
getGraphName()
Get the name of the associated graph
|
Class<T> |
getIndexClass()
Gets the class associated to this index
|
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<String,Object>[] |
getParameters()
Gets the Parameters associated to this index.
|
CloseableIterable<T>[] |
getPartitioned(Object[] connections,
String key,
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. |
CloseableIterable<T> |
query(String key,
Object value)
Query for all the elements satisfying the specified K/V property within
the index
|
CloseableIterable<T> |
query(String key,
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, waitgetIndexedKeys, indexElements, reindexElements, reindexElementsPartitionedadd, commit, count, dropIndex, get, get, getDirectoryName, getDocIdentifier, getPartitioned, getPartitioned, getTotalShards, remove, removeAllpublic OracleTextAutoIndex(String indexName, 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 String buildSearchTerm(String key, Object value)
buildSearchTerm in interface OracleIndex<T extends Element>key - the key of the K/V propertyvalue - the value object of the K/V propertypublic final String buildSearchTerm(String key, Object value, Class dtClass)
buildSearchTerm in interface OracleIndex<T extends 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 Element>public void close()
close in interface OracleIndex<T extends Element>public boolean containsIndexedKey(String key)
containsIndexedKey in interface OracleAutoIndex<T extends Element>key - the key to validatepublic final long count(String key, Object value)
count in interface Index<T extends 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(String key, Object value, boolean acceptWildcard)
count in interface OracleIndex<T extends 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 CloseableIterable<T> get(String key, Object value)
get in interface Index<T extends 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 CloseableIterable<T> get(String key, Object value, boolean acceptWildcard)
get in interface OracleAutoIndex<T extends Element>get in interface OracleIndex<T extends 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 String getGraphName()
getGraphName in interface OracleIndex<T extends Element>public final Class<T> getIndexClass()
getIndexClass in interface Index<T extends Element>getIndexClass in interface OracleIndex<T extends Element>public final String getIndexName()
getIndexName in interface Index<T extends Element>public OracleTextParameters getIndexParameters()
LuceneParameters object.public OracleIndexParameters getOracleIndexParameters()
getOracleIndexParameters in interface OracleIndex<T extends Element>public Parameter<String,Object>[] getParameters()
getParameters in interface OracleIndex<T extends Element>Parameter array.public final CloseableIterable<T>[] getPartitioned(Object[] connections, String key, 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 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 CloseableIterable<T> query(String key, Object value)
query in interface Index<T extends 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 CloseableIterable<T> query(String key, Object value, boolean useWildcards)
query in interface OracleIndex<T extends 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 Oracle and/or its affiliates. All Rights Reserved.