|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.impetus.kundera.index.DocumentIndexer
public abstract class DocumentIndexer
The Class KunderaIndexer.
| Field Summary | |
|---|---|
protected org.apache.lucene.analysis.Analyzer |
analyzer
The analyzer. |
protected static String |
DEFAULT_SEARCHABLE_FIELD
The Constant DEFAULT_SEARCHABLE_FIELD. |
protected static int |
docNumber
The doc number. |
protected static String |
INDEX_NAME
The INDEX_NAME. |
private static org.slf4j.Logger |
LOG
log for this class. |
protected static String |
SUPERCOLUMN_INDEX
The Constant SUPERCOLUMN_INDEX. |
protected org.apache.lucene.analysis.Tokenizer |
tokenizer
The tokenizer. |
private static long |
UUID
The Constant UUID. |
| Constructor Summary | |
|---|---|
DocumentIndexer()
Instantiates a new lucandra indexer. |
|
| Method Summary | |
|---|---|
protected void |
addEntityClassToDocument(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document document)
Prepare index document. |
protected void |
addEntityFieldsToDocument(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document document)
Adds the index properties. |
private void |
addFieldToDocument(Object object,
org.apache.lucene.document.Document document,
Field field,
String colName,
String indexName)
Index field. |
protected void |
addParentKeyToDocument(String parentId,
org.apache.lucene.document.Document currentDoc,
Class<?> clazz)
Index parent key. |
private void |
addSuperColumnNameToDocument(String superColumnName,
org.apache.lucene.document.Document currentDoc)
Index super column name. |
protected void |
createSuperColumnDocument(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document currentDoc,
Object embeddedObject,
javax.persistence.metamodel.EmbeddableType superColumn)
Index super column. |
protected String |
getCannonicalPropertyName(String indexName,
String propertyName)
Gets the cannonical property name. |
protected String |
getKunderaId(EntityMetadata metadata,
Object id)
Gets the kundera id. |
protected abstract void |
indexDocument(EntityMetadata metadata,
org.apache.lucene.document.Document currentDoc)
Index document. |
protected void |
indexSuperColumn(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document currentDoc,
Object embeddedObject,
javax.persistence.metamodel.EmbeddableType superColumn)
Index super column. |
protected org.apache.lucene.document.Document |
prepareDocumentForSuperColumn(EntityMetadata metadata,
Object object,
String embeddedColumnName,
String parentId,
Class<?> clazz)
Prepare document. |
Map<String,Object> |
search(String query,
Class<?> parentClass,
Class<?> childClass,
Object entityId,
int start,
int count)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.impetus.kundera.index.lucene.Indexer |
|---|
close, documentExistsInIndex, entityExistsInIndex, flush, index, index, search, unindex, update |
| Methods inherited from interface com.impetus.kundera.index.Indexer |
|---|
index, search, unIndex |
| Field Detail |
|---|
private static final org.slf4j.Logger LOG
protected static final String INDEX_NAME
private static final long UUID
protected static final String DEFAULT_SEARCHABLE_FIELD
protected static final String SUPERCOLUMN_INDEX
protected static int docNumber
protected org.apache.lucene.analysis.Analyzer analyzer
protected org.apache.lucene.analysis.Tokenizer tokenizer
| Constructor Detail |
|---|
public DocumentIndexer()
analyzer - the analyzer| Method Detail |
|---|
protected org.apache.lucene.document.Document prepareDocumentForSuperColumn(EntityMetadata metadata,
Object object,
String embeddedColumnName,
String parentId,
Class<?> clazz)
metadata - the metadataobject - the objectembeddedColumnName - the super column nameparentId - the parent idclazz - the clazz
protected void addParentKeyToDocument(String parentId,
org.apache.lucene.document.Document currentDoc,
Class<?> clazz)
parentId - the parent idcurrentDoc - the current docclazz - the clazz
protected void createSuperColumnDocument(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document currentDoc,
Object embeddedObject,
javax.persistence.metamodel.EmbeddableType superColumn)
metadata - the metadataobject - the objectcurrentDoc - the current docembeddedObject - the embedded objectsuperColumn - the super column
protected void indexSuperColumn(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document currentDoc,
Object embeddedObject,
javax.persistence.metamodel.EmbeddableType superColumn)
metadata - the metadataobject - the objectcurrentDoc - the current docembeddedObject - the embedded objectsuperColumn - the super column
private void addSuperColumnNameToDocument(String superColumnName,
org.apache.lucene.document.Document currentDoc)
superColumnName - the super column namecurrentDoc - the current doc
protected void addEntityFieldsToDocument(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document document)
metadata - the metadataobject - the objectdocument - the document
protected void addEntityClassToDocument(EntityMetadata metadata,
Object object,
org.apache.lucene.document.Document document)
metadata - the metadataobject - the objectdocument - the document
private void addFieldToDocument(Object object,
org.apache.lucene.document.Document document,
Field field,
String colName,
String indexName)
object - the objectdocument - the documentfield - the fieldcolName - the col nameindexName - the index name
public Map<String,Object> search(String query,
Class<?> parentClass,
Class<?> childClass,
Object entityId,
int start,
int count)
search in interface Indexer
protected String getKunderaId(EntityMetadata metadata,
Object id)
metadata - the metadataid - the id
protected String getCannonicalPropertyName(String indexName,
String propertyName)
indexName - the index namepropertyName - the property name
protected abstract void indexDocument(EntityMetadata metadata,
org.apache.lucene.document.Document currentDoc)
metadata - the metadatacurrentDoc - the current doc
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||