Object | +--helma.Search.Document
Instances of this class represent a single
index document. This class provides various methods for
adding content to such documents.
Defined in Search.js
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |
| Constructor Summary | |
helma.Search.Document(<org.apache.lucene.document.Document> document)
Creates a new instance of helma.Search.Document. |
|
| Methods Summary | |
void
|
addField(<String> name, <String> value, <Object> param)
Adds a field to this document. |
Number
|
getBoost()
Returns the boost factor of a document. |
Object
|
getDateField(<String> name)
Returns the value of a single document field converted into a Date object. |
org.apache.lucene.document.Document
|
getDocument()
Returns the wrapped Lucene Document object |
Object
|
getField(<String> name)
Returns a single document field containing a value other than a date object, for which you should use getDateField(). |
Array
|
getFields()
Returns the fields of a document object. |
void
|
setBoost(<Number> boost)
Sets the boost factor of a document. |
| Constructor Detail |
helma.Search.Document(<org.apache.lucene.document.Document> document)
document - Optional Lucene Document object that should be wrapped by this Document instance.
| Method Detail |
void addField(<String> name, <String> value, <Object> param)
name - The name of the field
value - The value of the field
param - Optional parameter object containing the following properties: store (Boolean) defaults to trueindex (Boolean) defaults to truetokenize (Boolean) defaults to trueNumber getBoost()
Object getDateField(<String> name)
name - The name of the field in this document object.
name (String) The name of the fieldboost (Int) The boost factorindexed (Boolean) True if the field is indexed, false otherwisestored (Boolean) True if the field is stored, false otherwisetokenized (Boolean) True if the field is tokenized, false otherwisevalue (String) The value of the field as Dateorg.apache.lucene.document.Document getDocument()
Object getField(<String> name)
name - The name of the field in this document object.
name (String) The name of the fieldboost (Int) The boost factorindexed (Boolean) True if the field is indexed, false otherwisestored (Boolean) True if the field is stored, false otherwisetokenized (Boolean) True if the field is tokenized, false otherwisevalue (String) The value of the fieldArray getFields()
void setBoost(<Number> boost)
boost - The boost factor of the document
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |