class MMBaseIndexDefinition extends QueryDefinition implements IndexDefinition
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.lucene.analysis.Analyzer |
analyzer |
protected String |
id |
protected List<String> |
identifierFields |
static int |
MAX_NODES_IN_QUERY
The default maximum number of nodes that are returned by a call to the searchqueryhandler.
|
protected int |
maxNodesInQuery
The maximum number of nodes that are returned by a call to the searchqueryhandler.
|
protected List<IndexDefinition> |
subQueries
Subqueries for this index.
|
elementManager, elementStep, fields, isMultiLevel, query| Constructor and Description |
|---|
MMBaseIndexDefinition() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
Per index a an Analyzer can be defined.
|
CloseableIterator<MMBaseEntry> |
getCursor()
Returns an Iterator over all
IndexEntry's defined by this index. |
protected CloseableIterator<MMBaseEntry> |
getCursor(NodeIterator nodeIterator,
Collection<? extends FieldDefinition> f)
Converts an MMBase Node Iterator to an Iterator of IndexEntry-s.
|
String |
getId() |
List<String> |
getIdentifierFields() |
Node |
getNode(Cloud userCloud,
org.apache.lucene.document.Document doc)
Defines how a Node for this index must be produced.
|
protected NodeIterator |
getNodeIterator(String id)
Creates an (Huge)NodeListIterator for this index definition
|
ChainedReleaseStrategy |
getReleaseStrategy() |
CloseableIterator<MMBaseEntry> |
getSubCursor(String identifier)
Returns an Iterator over all
IndexEntry's defined by this index, restricted by a
certain identifier. |
boolean |
inIndex(String identifier)
Whether the object with given key would be included in this index
|
void |
setAnalyzer(org.apache.lucene.analysis.Analyzer a) |
void |
setId(String i) |
String |
toString() |
configure, getVariables, setVariablespublic static final int MAX_NODES_IN_QUERY
protected int maxNodesInQuery
protected final List<IndexDefinition> subQueries
protected org.apache.lucene.analysis.Analyzer analyzer
protected String id
public ChainedReleaseStrategy getReleaseStrategy()
public void setId(String i)
setId in interface IndexDefinitionpublic String getId()
getId in interface IndexDefinitionpublic void setAnalyzer(org.apache.lucene.analysis.Analyzer a)
public org.apache.lucene.analysis.Analyzer getAnalyzer()
IndexDefinitiongetAnalyzer in interface IndexDefinitionpublic Node getNode(Cloud userCloud, org.apache.lucene.document.Document doc)
IndexDefinitiongetNode in interface IndexDefinitionpublic boolean inIndex(String identifier)
IndexDefinitioninIndex in interface IndexDefinitionprotected CloseableIterator<MMBaseEntry> getCursor(NodeIterator nodeIterator, Collection<? extends FieldDefinition> f)
public CloseableIterator<MMBaseEntry> getCursor()
IndexDefinitionIndexEntry's defined by this index. Only makes sense if this is not a 'sub definition'.getCursor in interface IndexDefinitionpublic CloseableIterator<MMBaseEntry> getSubCursor(String identifier)
IndexDefinitionIndexEntry's defined by this index, restricted by a
certain identifier. For a 'top' level index definition, this should normally return only one
Entry, and the key must be the identifier of this entry. For 'nested' IndexDefinitions, the
key most be the key of the parent.getSubCursor in interface IndexDefinitionprotected NodeIterator getNodeIterator(String id)
id - A node number. If used, the query will be limited. This is used to update the index on change of that node.public String toString()
toString in class QueryDefinitionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}