Global.helma.Search.Document.prototype.getDateField (name)
Returns the value of a single document and converts the value to a Date object.

  • Parameter {String}:
    name The name of the field in this document object.
  • Returns
    An object containing the following properties:
    • .name (String) The name of the field
    • .boost (Int) The boost factor
    • .indexed (Boolean) True if the field is indexed, false otherwise
    • .stored (Boolean) True if the field is stored, false otherwise
    • .tokenized (Boolean) True if the field is tokenized, false otherwise
    • .value (String) The value of the field as Date
  • See also
    #getField
Sourcecode in /home/hannes/helma/modules/helma/Search.js:
1111:   helma.Search.Document.prototype.getDateField = function(name) {
1112:       var result = this.getField(name);
1113:       if (result != null) {
1114:           // convert value to Date object
1115:           result.value = Packages.org.apache.lucene.document.DateTools.stringToDate(result.value);
1116:       }
1117:       return result;
1118:   }