Added ability to weight fields.

Fixed bug where results with null values in any field would be ignored.