|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.module.lucene.MMBaseEntry
public class MMBaseEntry
This defines how MMBase Nodes are added to Lucene documents. This also takes into account 'related' nodes, by using the 'sub definitions'.
| Field Summary | |
|---|---|
static DateFormat |
DATE_FORMAT
|
| Constructor Summary | |
|---|---|
MMBaseEntry(Node node,
Collection<IndexFieldDefinition> fields,
boolean multiLevel,
NodeManager elementManager,
Step elementStep,
Collection<IndexDefinition> subQueries)
|
|
| Method Summary | |
|---|---|
protected Set<String> |
addStandardKeys(Document document)
Adds the standard keys 'number', 'owner', 'builder' and returns a set of the steps which still needs adding to the document. |
(package private) void |
addToIndexed(int number,
String fieldName,
String alias)
Add a name of a node with the specified number as having been indexed (so it won't be attempted to index it again) |
(package private) String |
getFieldDataAsString(Map<String,?> data,
String fieldName)
Return the data of a field as a string. |
String |
getIdentifier()
The identifier which can be used to retrieve this IndexEntry, and which should uniquely identify it. |
String |
getKey()
Key to be used for 'sub-queries', this can be the same as IndexEntry.getIdentifier(), but this is not necessary. |
protected Node |
getNode(IndexFieldDefinition fd)
|
protected String |
getRealField(IndexFieldDefinition fd)
|
Collection<IndexDefinition> |
getSubDefinitions()
Returns a Collection of 'sub definition', probably copied from the IndexDefinition which produces this entry. |
void |
index(Document document)
Writes this index entry to a lucene Document. |
(package private) boolean |
isIndexed(int number,
String fieldName,
String alias)
Returns true if a field of a node indicated by the number has already been indexed. |
protected boolean |
shouldIndex(IndexFieldDefinition fd)
|
protected void |
storeData(Map<String,Object> map)
Store data from field in a node into the cursor |
(package private) void |
storeFieldData(Map<String,Object> data,
String fieldName,
Object value)
Store data for a field to index. |
(package private) void |
storeFieldTextData(Map<String,Object> data,
String fieldName,
String value)
Store textual data for a field to index. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final DateFormat DATE_FORMAT
| Constructor Detail |
|---|
MMBaseEntry(Node node,
Collection<IndexFieldDefinition> fields,
boolean multiLevel,
NodeManager elementManager,
Step elementStep,
Collection<IndexDefinition> subQueries)
| Method Detail |
|---|
public String getIdentifier()
IndexEntry
getIdentifier in interface IndexEntrypublic String getKey()
IndexEntryIndexEntry.getIdentifier(), but this is not necessary.
getKey in interface IndexEntryprotected Set<String> addStandardKeys(Document document)
public void index(Document document)
IndexEntryDocument.
This does not consider sub-definitions. This is done by Indexer using IndexEntry.getSubDefinitions()
index in interface IndexEntrypublic Collection<IndexDefinition> getSubDefinitions()
IndexEntry
getSubDefinitions in interface IndexEntryprotected Node getNode(IndexFieldDefinition fd)
protected String getRealField(IndexFieldDefinition fd)
protected boolean shouldIndex(IndexFieldDefinition fd)
protected void storeData(Map<String,Object> map)
map - The map of fieldName/value mappings
void storeFieldTextData(Map<String,Object> data,
String fieldName,
String value)
fieldname - the name of the field used for indexing (the 'as' name of a field where appropriate)value - the textual value to indexdata - The map of fieldName/value mappings
void storeFieldData(Map<String,Object> data,
String fieldName,
Object value)
fieldname - the name of the field used for indexing (the 'as' name of a field where appropriate)value - the value to index
String getFieldDataAsString(Map<String,?> data,
String fieldName)
fieldname - the name of the field used for indexing (the 'as' name of a field where appropriate)
void addToIndexed(int number,
String fieldName,
String alias)
number - the number of the nodefieldName - the name of the fieldalias - the alias under which the field is indexed
boolean isIndexed(int number,
String fieldName,
String alias)
true if a field of a node indicated by the number has already been indexed.
number - the number of the nodefieldName - the name of the fieldalias - the alias under which the field is indexedpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||