return the string for date types if passed for search

This commit is contained in:
Shay Banon 2013-01-04 23:31:49 +01:00
parent 7726a4a9dd
commit fe38cecabd
1 changed files with 4 additions and 0 deletions

View File

@ -207,6 +207,10 @@ public class DateFieldMapper extends NumberFieldMapper<Long> {
*/
@Override
public Object valueForSearch(Object value) {
if (value instanceof String) {
// assume its the string that was indexed, just return it... (for example, with get)
return value;
}
Long val = value(value);
if (val == null) {
return null;