|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.query.lucene.basic.BasicLuceneSchema
public class BasicLuceneSchema
The LuceneSchema implementation that uses a single index for node information
.
Constructor Summary | |
---|---|
BasicLuceneSchema(ExecutionContext context,
org.hibernate.search.engine.spi.SearchFactoryImplementor searchFactory,
org.apache.lucene.util.Version version,
boolean enableFullTextSearch)
|
Method Summary | |
---|---|
void |
addBinaryToIndex(Binary binary,
org.hibernate.search.backend.TransactionContext txnCtx)
|
protected DynamicField |
addDynamicField(String propertyName,
Object value,
DynamicField previous,
org.apache.lucene.document.Field.Store stored,
boolean fullTextSearchable,
StringBuilder fullText)
Create a dynamic field to store the property value. |
void |
addToIndex(String workspace,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes,
Collection<Property> properties,
NodeTypeSchemata schemata,
org.hibernate.search.backend.TransactionContext txnCtx)
Add to the index the information about a node. |
LuceneQueryFactory |
createLuceneQueryFactory(QueryContext context,
org.hibernate.search.SearchFactory searchFactory)
|
LuceneQuery |
createQuery(SelectorName selectorName,
List<Constraint> andedConstraints,
LuceneProcessingContext processingContext)
Create a LuceneQuery for the supplied ANDed constraints of the ModeShape access query, which comes from the leaves
of a query plan. |
LuceneQueryEngine.TupleCollector |
createTupleCollector(QueryContext queryContext,
QueryResults.Columns columns)
|
protected NodeInfo |
nodeInfo(String id,
String workspace,
Path path,
Name primaryType,
Set<Name> mixinTypes,
Iterator<Property> propertyIterator,
NodeTypeSchemata schemata)
|
void |
removeAllFromIndex(String workspace,
org.hibernate.search.backend.TransactionContext txnCtx)
|
void |
removeBinariesFromIndex(Iterable<String> sha1s,
org.hibernate.search.backend.TransactionContext txnCtx)
|
void |
removeFromIndex(String workspace,
Iterable<NodeKey> keys,
org.hibernate.search.backend.TransactionContext txnCtx)
|
void |
shutdown()
|
protected String |
stringFrom(Name name)
|
protected String |
stringFrom(Path path)
|
void |
updateIndex(String workspace,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes,
Iterator<Property> properties,
NodeTypeSchemata schemata,
org.hibernate.search.backend.TransactionContext txnCtx)
Update the index to reflect the new state of the node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicLuceneSchema(ExecutionContext context, org.hibernate.search.engine.spi.SearchFactoryImplementor searchFactory, org.apache.lucene.util.Version version, boolean enableFullTextSearch)
context
- the execution context for the repositorysearchFactory
- the search factory for accessing the indexesversion
- the Lucene versionenableFullTextSearch
- true if full-text searching is enabled, or false otherwiseMethod Detail |
---|
public void shutdown()
public LuceneQueryFactory createLuceneQueryFactory(QueryContext context, org.hibernate.search.SearchFactory searchFactory)
createLuceneQueryFactory
in interface LuceneSchema
protected final String stringFrom(Path path)
protected final String stringFrom(Name name)
protected final NodeInfo nodeInfo(String id, String workspace, Path path, Name primaryType, Set<Name> mixinTypes, Iterator<Property> propertyIterator, NodeTypeSchemata schemata)
protected final DynamicField addDynamicField(String propertyName, Object value, DynamicField previous, org.apache.lucene.document.Field.Store stored, boolean fullTextSearchable, StringBuilder fullText)
propertyName
- the name of the field in which the property value is to be stored; never nullvalue
- the property value; may be nullprevious
- the previous DynamicField; may be nullstored
- true if the value is to be stored so it can be used in comparison criteriafullTextSearchable
- true if this property value should be full-text searchablefullText
- the node's full-text search text to which any full-text searchable terms should be added; will not be null
if fullTextSearchable
is true
previous
if none are createdpublic void addToIndex(String workspace, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, Collection<Property> properties, NodeTypeSchemata schemata, org.hibernate.search.backend.TransactionContext txnCtx)
QueryIndexing
addToIndex
in interface QueryIndexing
workspace
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullpath
- the path of the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyproperties
- the properties of the node; may not be null but may be emptyschemata
- the node type schemata that should be used to determine how the node is to be indexed; may not be nulltxnCtx
- the transaction context in which the index updates should be made; may not be nullpublic void updateIndex(String workspace, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, Iterator<Property> properties, NodeTypeSchemata schemata, org.hibernate.search.backend.TransactionContext txnCtx)
QueryIndexing
updateIndex
in interface QueryIndexing
workspace
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullpath
- the path of the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyproperties
- the properties of the node; may not be null but may be emptyschemata
- the node type schemata that should be used to determine how the node is to be indexed; may not be nulltxnCtx
- the transaction context in which the index updates should be made; may not be nullpublic void removeFromIndex(String workspace, Iterable<NodeKey> keys, org.hibernate.search.backend.TransactionContext txnCtx)
removeFromIndex
in interface QueryIndexing
public void removeAllFromIndex(String workspace, org.hibernate.search.backend.TransactionContext txnCtx)
removeAllFromIndex
in interface QueryIndexing
public void addBinaryToIndex(Binary binary, org.hibernate.search.backend.TransactionContext txnCtx)
addBinaryToIndex
in interface QueryIndexing
public void removeBinariesFromIndex(Iterable<String> sha1s, org.hibernate.search.backend.TransactionContext txnCtx)
removeBinariesFromIndex
in interface QueryIndexing
public LuceneQuery createQuery(SelectorName selectorName, List<Constraint> andedConstraints, LuceneProcessingContext processingContext) throws LuceneException
LuceneSchema
LuceneQuery
for the supplied ANDed constraints of the ModeShape access query, which comes from the leaves
of a query plan.
createQuery
in interface LuceneSchema
selectorName
- the name of the selector (or node type); never nullandedConstraints
- the constraints of the access query that are all ANDed together; never nullprocessingContext
- the processing context; never null
LuceneException
public LuceneQueryEngine.TupleCollector createTupleCollector(QueryContext queryContext, QueryResults.Columns columns)
createTupleCollector
in interface LuceneSchema
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |