boolean values cannot be searched with expected queries, closes #327.

This commit is contained in:
kimchy 2010-08-18 15:11:23 +03:00
parent de71a1ce99
commit 91aada2706
1 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,10 @@ public class XContentBooleanFieldMapper extends XContentFieldMapper<Boolean> {
this.nullValue = nullValue;
}
@Override public boolean useFieldQueryWithQueryString() {
return true;
}
@Override public Boolean value(Fieldable field) {
return field.stringValue().charAt(0) == 'T' ? Boolean.TRUE : Boolean.FALSE;
}