Constructor
new Document(document)
Creates a new instance of helma.Search.Document.
Parameters:
Name | Type | Description |
---|---|---|
document |
org.apache.lucene.document.Document | Optional Lucene Document object that should be wrapped by this Document instance. |
- Source:
Classes
Methods
addField(name, value, options)
Adds a field to this document.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | helma.Search.Document.Field | The name of the field, or an instance of helma.Search.Document.Field, in which case the other arguments are ignored. |
value |
String | The value of the field |
options |
Object | Optional object containing the following properties
(each of them is optional too):
|
- Source:
getBoost()
Returns the boost factor of a document.
- Source:
Returns:
The boost factor of a document
getDocument()
Returns the wrapped Lucene Document object
- Source:
Returns:
The wrapped Document object
getField(name)
Returns a single document field.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the field in this document object. |
- Source:
Returns:
The field with the given name
getFields(name)
Returns the fields of a document object. If a name is passed as argument,
this method returns only the fields with the given name
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Optional name of the fields to return |
- Source:
Returns:
An array containing all fields in this document object.
removeField(name)
Removes all fields with the given name from this document
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the field(s) to remove |
- Source:
setBoost(boost)
Sets the boost factor of a document.
Parameters:
Name | Type | Description |
---|---|---|
boost |
Number | The boost factor of the document |
- Source: