public interface OracleIndex<T extends Element> extends Index<T>
Modifier and Type | Field and Description |
---|---|
static String |
EDGE_ID_PROP
A constant text index field name for the ID of an edge
|
static String |
EDGE_LABEL_PROP
A constant text index field name for the label of an edge
|
static String |
END_NODE_ID_PROP
A constant text index field name for the ID of an edge's head (destination) vertex
|
static String |
START_NODE_ID_PROP
A constant text index field name for the ID of an edge's tail (starting) vertex
|
static char |
TYPE_DT_BOOL
This constant denotes a Boolean data type for the value field of an attribute (K/V pair)
|
static char |
TYPE_DT_DATE
This constant denotes a Date (java.util.Date) data type for the value field of an attribute (K/V pair)
|
static char |
TYPE_DT_DOUBLE
This constant denotes a Double data type for the value field of an attribute (K/V pair)
|
static char |
TYPE_DT_FLOAT
This constant denotes a Float data type for the value field of an attribute (K/V pair)
|
static char |
TYPE_DT_INTEGER
This constant denotes an Integer data type for the value field of an attribute (K/V pair)
|
static char |
TYPE_DT_SERIALIZABLE
This constant denotes a Serializable data type for the value field of an attribute (K/V pair)
|
static char |
TYPE_DT_STRING
This constant denotes a String data type for the value field of an attribute (K/V pair)
|
static String |
VERTEX_ID_PROP
A constant text index field name for the ID of a vertex
|
Modifier and Type | Method and Description |
---|---|
void |
add(T element)
Adds a new Element into the index using all its associated key/value pairs
|
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 OracleIndex object
|
void |
commit()
Commit changes
|
long |
count(String key, Object value, boolean acceptWildcard)
Counts all the matching elements that have a particular key/value property within the index
|
long |
count(String key, Object value, Class dtClass, boolean acceptWildcard)
Counts all the matching elements that have a particular key/value property within the index
|
void |
dropIndex()
Drops and removes all data from the text index (including its directory)
|
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
|
CloseableIterable<T> |
get(String key, Object value, Class dtValue, boolean acceptWildcard)
Gets an Iterable object with all the matching elements that have a particular key/value property within the index
|
String |
getDirectoryName()
Gets the directory name for this index.
|
String |
getDocIdentifier()
Get index document's identifier.
|
String |
getGraphName()
Get the name of the associated graph
|
Class<T> |
getIndexClass()
Gets the class associated to this index
|
OracleIndexParameters |
getOracleIndexParameters()
Gets the OracleIndexParameters associated to this index
|
Parameter[] |
getParameters()
Gets the OracleIndexParameters 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>[] |
getPartitioned(Object[] connections, String key, Object value, Class dtValue, boolean acceptWildcard, int startShardId)
Gets an array of
CloseableIterable objects that hold all the elements with an attribute matching the given K/V pair. |
int |
getTotalShards()
Gets the number of shards (directories) in this index
|
boolean |
isDelBatchEmpty()
Verifies if the deletes batch associated to this index is empty.
|
boolean |
isDelBatchFull()
Verifies if the deletes batch associated to this index is full.
|
boolean |
isUpdatesBatchEmpty()
Verifies if the updates batch associated to this index is empty.
|
boolean |
isUpdatesBatchFull()
Verifies if the updates batch associated to this index is full.
|
CloseableIterable<T> |
query(String key, Object value, boolean useWildcards)
Gets all the elements matching the specified K/V property within the index
|
void |
refreshIndex(long lStartSCN, long lEndSCN)
Auto-refresh an index based on all insert/deletes between the specified start and end SCN.
|
void |
remove(T element)
Deletes an element from this index
|
void |
removeAll(String key)
Removes all the elements from the index matching the specified key.
|
static final String EDGE_ID_PROP
static final String EDGE_LABEL_PROP
static final String END_NODE_ID_PROP
static final String START_NODE_ID_PROP
static final char TYPE_DT_BOOL
static final char TYPE_DT_DATE
static final char TYPE_DT_DOUBLE
static final char TYPE_DT_FLOAT
static final char TYPE_DT_INTEGER
static final char TYPE_DT_SERIALIZABLE
static final char TYPE_DT_STRING
static final String VERTEX_ID_PROP
void add(T element)
element
- an Element
object.IOException
String buildSearchTerm(String key, Object value)
key
- the key of the K/V propertyvalue
- the value object of the K/V propertyString buildSearchTerm(String key, Object value, Class dtClass)
key
- the key of the K/V propertyvalue
- the value object of the K/V propertydtClass
- class of the value objectvoid clearIndex()
void close()
void commit()
long count(String key, Object value, boolean acceptWildcard)
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 edges with the given key to be returned.acceptWildcard
- specifies if wild cards can be used in the value object.long count(String key, Object value, Class dtClass, boolean acceptWildcard)
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 edges with the given key to be returned.dtClass
- 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.acceptWildcard
- specifies if wild cards can be used in the value object.CloseableIterable
object.void dropIndex()
CloseableIterable<T> get(String key, Object value, boolean acceptWildcard)
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 edges with the given key to be returned.acceptWildcard
- specifies if wild cards can be used in the value object.CloseableIterable
object.CloseableIterable<T> get(String key, Object value, Class dtValue, boolean acceptWildcard)
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 edges with the given key to be returned.dtValue
- 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.acceptWildcard
- specifies if wild cards can be used in the value object.CloseableIterable
object.String getDirectoryName()
String getDocIdentifier()
String getGraphName()
Class<T> getIndexClass()
getIndexClass
in interface Index<T extends Element>
OracleIndexParameters getOracleIndexParameters()
Parameter[] getParameters()
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 a corresponding shard. Note that we assign an integer ID (in the range of [0, N - 1]) to all the shards in the index with N shards. The subset of shards queried will consist of those shards with ID value in the range of [startShardId, startShardId - 1 + size of connections array].connections
- an array of connections to the search engine.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.CloseableIterable<T>[] getPartitioned(Object[] connections, String key, Object value, Class dtValue, 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 a corresponding shard. Note that we assign an integer ID (in the range of [0, N - 1]) to all the shards in the index with N shards. The subset of shards queried will consist of those shards with ID value in the range of [startShardId, startShardId - 1 + size of connections array].connections
- an array of connections to the search engine.key
- the key of a propertyvalue
- the value object of the property.dtValue
- 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.acceptWildcard
- specifies if wild cards can be used in the value object.startShardId
- the ID of the starting shard.CloseableIterable
object.int getTotalShards()
boolean isDelBatchEmpty()
boolean isDelBatchFull()
boolean isUpdatesBatchEmpty()
boolean isUpdatesBatchFull()
CloseableIterable<T> query(String key, Object value, boolean useWildcards)
key
- the key of the K/V propertyvalue
- the value object of the K/V propertyuseWildcards
- specifies if wild cards can be used in the value object.CloseableIterable
object.void refreshIndex(long lStartSCN, long lEndSCN)
lStartSCN
- start SCN value. A NULL value will be treated as MINVALUE to the underlying Oracle Database.lEndSCN
- end SCN value. A NULL value will be treated as MAXVALUE to the underlying Oracle Database.void remove(T element)
element
- an Element
object.IOException
void removeAll(String key)
key
- the key to remove from the index.Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.