Stored binary fields to change internal representation (break Java API if used), closes #2092.

This commit is contained in:
Shay Banon 2012-07-09 16:53:20 +02:00
parent e91a0d85a7
commit 1a085d9bfa
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ public class ShardGetService extends AbstractIndexShardComponent {
} }
if (value == null) { if (value == null) {
if (field.isBinary()) { if (field.isBinary()) {
value = field.getBinaryValue(); value = new BytesArray(field.getBinaryValue(), field.getBinaryOffset(), field.getBinaryLength());
} else { } else {
value = field.stringValue(); value = field.stringValue();
} }

View File

@ -197,7 +197,7 @@ public class FetchPhase implements SearchPhase {
} }
if (value == null) { if (value == null) {
if (field.isBinary()) { if (field.isBinary()) {
value = field.getBinaryValue(); value = new BytesArray(field.getBinaryValue(), field.getBinaryOffset(), field.getBinaryLength());
} else { } else {
value = field.stringValue(); value = field.stringValue();
} }