public class JdbcIndexDefinition extends Object implements IndexDefinition
| Modifier and Type | Class and Description |
|---|---|
class |
JdbcIndexDefinition.JdbcEntry |
protected class |
JdbcIndexDefinition.LazyMap
A map representing a row in a database.
|
| Modifier and Type | Field and Description |
|---|---|
protected static Cache<String,JdbcIndexDefinition.LazyMap> |
nodeCache |
| Constructor and Description |
|---|
JdbcIndexDefinition(DataSource ds,
Element element,
Set allIndexedFields,
boolean storeText,
boolean mergeText,
org.apache.lucene.analysis.Analyzer a,
boolean isSub) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
Per index a an Analyzer can be defined.
|
CloseableIterator<JdbcIndexDefinition.JdbcEntry> |
getCursor()
Returns an Iterator over all
IndexEntry's defined by this index. |
protected Connection |
getDirectConnection()
Jdbc connection pooling of MMBase would kill the statement if too duratious.
|
protected String |
getFindSql(String identifier) |
String |
getId() |
Node |
getNode(Cloud userCloud,
org.apache.lucene.document.Document doc)
Defines how a Node for this index must be produced.
|
protected String |
getSql(String identifier) |
(package private) CloseableIterator<JdbcIndexDefinition.JdbcEntry> |
getSqlCursor(String sql) |
CloseableIterator<JdbcIndexDefinition.JdbcEntry> |
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 |
setId(String i) |
String |
toString() |
protected static Cache<String,JdbcIndexDefinition.LazyMap> nodeCache
JdbcIndexDefinition(DataSource ds, Element element, Set allIndexedFields, boolean storeText, boolean mergeText, org.apache.lucene.analysis.Analyzer a, boolean isSub)
public void setId(String i)
setId in interface IndexDefinitionpublic String getId()
getId in interface IndexDefinitionprotected Connection getDirectConnection() throws SQLException
SQLExceptionpublic org.apache.lucene.analysis.Analyzer getAnalyzer()
IndexDefinitiongetAnalyzer in interface IndexDefinitionpublic boolean inIndex(String identifier)
IndexDefinitioninIndex in interface IndexDefinitionCloseableIterator<JdbcIndexDefinition.JdbcEntry> getSqlCursor(String sql)
public Node getNode(Cloud userCloud, org.apache.lucene.document.Document doc)
IndexDefinitiongetNode in interface IndexDefinitionpublic CloseableIterator<JdbcIndexDefinition.JdbcEntry> getCursor()
IndexDefinitionIndexEntry's defined by this index. Only makes sense if this is not a 'sub definition'.getCursor in interface IndexDefinitionpublic CloseableIterator<JdbcIndexDefinition.JdbcEntry> 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 IndexDefinitionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}