public abstract class LuceneVertexAutoIndex extends LuceneAutoIndex<Vertex> implements OracleAutoIndex<Vertex>
EDGE_ID_PROP, EDGE_LABEL_PROP, END_NODE_ID_PROP, START_NODE_ID_PROP, TYPE_DT_BOOL, TYPE_DT_DATE, TYPE_DT_DOUBLE, TYPE_DT_FLOAT, TYPE_DT_INTEGER, TYPE_DT_SERIALIZABLE, TYPE_DT_STRING, VERTEX_ID_PROP
Constructor and Description |
---|
LuceneVertexAutoIndex(String indexName, OraclePropertyGraphBase oraclePropertyGraph, Parameter<String,Object>[] indexParameters, boolean erase)
Constructs a new LuceneVertexAutoIndex object.
|
Modifier and Type | Method and Description |
---|---|
CloseableIterable<Vertex> |
get(String key, Object value, Class dtClass, boolean acceptWildcard)
Gets all vertices indexed by the provided key/value.
|
String |
getDocIdentifier()
Gets the document's identifier associated to this index.
|
Iterable<Vertex> |
getElementsFromPG()
Gets an Iterable<T> of edges from the associated property graph.
|
Iterable<Vertex> |
getElementsFromPG(String key)
Gets an Iterable<Vertex> of edges from the associated property graph, matching the specified key.
|
Iterable<Vertex> |
getElementsFromPG(String[] keys)
Gets an Iterable<Vertex> of edges from the associated property graph, matching any of the specified keys.
|
CloseableIterable<Vertex>[] |
getPartitioned(Object[] connections, String key, Object value, Class dtClass, boolean acceptWildcard, int startShardId)
Gets an array of
CloseableIterable objects that hold all the vertexs with an attribute matching the given K/V pair. |
close, closeConnectionsArray, containsIndexedKey, getConnectionsArray, getElementsFromPG, getIndexedKeys, getPartitionsNumber, indexElements, indexElementsPartitioned, loadIndexedKeys, put, put, reindexElements, reindexElements, reindexElements, reindexElementsNoPartitioned, reindexElementsPartitioned, reindexElementsPartitioned, reindexElementsPartitioned
add, addToDeleteCache, buildSearchTerm, buildSearchTerm, clearIndex, commit, count, count, count, deleteExistingDirectories, dropIndex, get, get, getDirectory, getDirectoryName, getGraphName, getIndexClass, getIndexName, getIndexParameters, getOracleDirectory, getOracleIndexParameters, getOracleSearcherManager, getParameters, getPartitioned, getSearcherFactory, getTotalShards, isAutoIndex, isDelBatchEmpty, isDelBatchFull, isUpdatesBatchEmpty, isUpdatesBatchFull, query, query, remove, remove, remove, remove, removeAll, removeAll
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeConnectionsArray, containsIndexedKey, get, getConnectionsArray, getElementsFromPG, getIndexedKeys, getPartitionsNumber, indexElements, indexElementsPartitioned, loadIndexedKeys, reindexElements, reindexElements, reindexElements, reindexElementsNoPartitioned, reindexElementsPartitioned, reindexElementsPartitioned, reindexElementsPartitioned
add, buildSearchTerm, buildSearchTerm, clearIndex, close, commit, count, count, dropIndex, getDirectoryName, getGraphName, getIndexClass, getOracleIndexParameters, getParameters, getPartitioned, getTotalShards, isDelBatchEmpty, isDelBatchFull, isUpdatesBatchEmpty, isUpdatesBatchFull, query, refreshIndex, remove, removeAll
public LuceneVertexAutoIndex(String indexName, OraclePropertyGraphBase oraclePropertyGraph, Parameter<String,Object>[] indexParameters, boolean erase)
indexName
- the name of the indexoraclePropertyGraph
- an OraclePropertyGraphBase
object.indexParameters
- a collection of parameters for the underlying index implementation.erase
- a boolean specifying if the index should be cleared at the beginning.public CloseableIterable<Vertex> get(String key, Object value, Class dtClass, boolean acceptWildcard)
get
in interface OracleIndex<Vertex>
get
in class LuceneIndex<Vertex>
key
- the key of the indexed vertexs.value
- the value of the indexed vertexs.acceptWildcard
- specifies if wild cards can be used in the value object.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.public String getDocIdentifier()
getDocIdentifier
in interface OracleIndex<Vertex>
getDocIdentifier
in class LuceneIndex<Vertex>
public Iterable<Vertex> getElementsFromPG()
getElementsFromPG
in interface OracleAutoIndex<Vertex>
getElementsFromPG
in class LuceneAutoIndex<Vertex>
public Iterable<Vertex> getElementsFromPG(String key)
getElementsFromPG
in interface OracleAutoIndex<Vertex>
getElementsFromPG
in class LuceneAutoIndex<Vertex>
key
- name of the property. It can be NULL which implies all vertices in the graph will be returned.public Iterable<Vertex> getElementsFromPG(String[] keys)
getElementsFromPG
in interface OracleAutoIndex<Vertex>
getElementsFromPG
in class LuceneAutoIndex<Vertex>
keys
- an array of property key names. It can be NULL which implies all vertices in the graph will be returned.public CloseableIterable<Vertex>[] getPartitioned(Object[] connections, String key, Object value, Class dtClass, boolean acceptWildcard, int startShardId)
CloseableIterable
objects that hold all the vertexs with an attribute matching the given K/V pair. Each vertex in the CloseableIterable
array uses a separate connection provided to fetch a subset of the results from a corresponding Lucene sub-directory. Note that we assign an integer ID (in the range of [0, N - 1]) to all the sub-directories in a Lucene index with N shards. The subset of shards (subdirectories) queried will consist of those shards with ID value in the range of [startShardId, startShardId - 1 + size of connections array].getPartitioned
in interface OracleIndex<Vertex>
getPartitioned
in class LuceneIndex<Vertex>
connections
- an array of connections to the Lucene index. Each vertex of this array should be of type SearcherManager. See LuceneIndex.getOracleSearcherManager(int)
.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.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 dtValue is Float.Class, then this value will be treated as a 3.01f.CloseableIterable
object.Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.