public abstract class LuceneExplicitIndex extends Object implements org.neo4j.kernel.api.ExplicitIndex
Modifier and Type | Method and Description |
---|---|
void |
addNode(long entityId,
String key,
Object value)
See
Index.add(PropertyContainer, String, Object) for more generic
documentation. |
void |
drop() |
org.neo4j.kernel.api.ExplicitIndexHits |
get(String key,
Object value) |
org.neo4j.kernel.api.ExplicitIndexHits |
query(Object queryOrQueryObject) |
org.neo4j.kernel.api.ExplicitIndexHits |
query(String key,
Object queryOrQueryObject)
queryOrQueryObject can be a String containing the query
in Lucene syntax format, http://lucene.apache.org/java/3_0_2/queryparsersyntax.html. |
void |
remove(long entityId) |
void |
remove(long entityId,
String key) |
void |
remove(long entityId,
String key,
Object value)
See
Index.remove(PropertyContainer, String, Object) for more
generic documentation. |
public void addNode(long entityId, String key, Object value) throws org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
Index.add(PropertyContainer, String, Object)
for more generic
documentation.
Adds key/value to the entity
in this index. Added values are
searchable within the transaction, but composite AND
queries aren't guaranteed to return added values correctly within that
transaction. When the transaction has been committed all such queries
are guaranteed to return correct results.addNode
in interface org.neo4j.kernel.api.ExplicitIndex
key
- the key in the key/value pair to associate with the entity.value
- the value in the key/value pair to associate with the
entity.org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
public void remove(long entityId, String key, Object value)
Index.remove(PropertyContainer, String, Object)
for more
generic documentation.
Removes key/value to the entity
in this index. Removed values
are excluded within the transaction, but composite AND
queries aren't guaranteed to exclude removed values correctly within
that transaction. When the transaction has been committed all such
queries are guaranteed to return correct results.remove
in interface org.neo4j.kernel.api.ExplicitIndex
entityId
- the entity (i.e Node
or Relationship
)
to dissociate the key/value pair from.key
- the key in the key/value pair to dissociate from the entity.value
- the value in the key/value pair to dissociate from the
entity.public void remove(long entityId, String key)
remove
in interface org.neo4j.kernel.api.ExplicitIndex
public void remove(long entityId)
remove
in interface org.neo4j.kernel.api.ExplicitIndex
public void drop()
drop
in interface org.neo4j.kernel.api.ExplicitIndex
public org.neo4j.kernel.api.ExplicitIndexHits get(String key, Object value) throws org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
get
in interface org.neo4j.kernel.api.ExplicitIndex
org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
public org.neo4j.kernel.api.ExplicitIndexHits query(String key, Object queryOrQueryObject) throws org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
queryOrQueryObject
can be a String
containing the query
in Lucene syntax format, http://lucene.apache.org/java/3_0_2/queryparsersyntax.html.
Or it can be a Query
object. If can even be a QueryContext
object which can contain a query (String
or Query
) and
additional parameters, such as Sort
.
Because of performance issues, including uncommitted transaction modifications
in the result is disabled by default, but can be enabled using
QueryContext.tradeCorrectnessForSpeed()
.query
in interface org.neo4j.kernel.api.ExplicitIndex
org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
public org.neo4j.kernel.api.ExplicitIndexHits query(Object queryOrQueryObject) throws org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
query
in interface org.neo4j.kernel.api.ExplicitIndex
org.neo4j.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
query(String, Object)
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.