Stored fields with multiple values might not return in search request asking for them, closes #1208.

This commit is contained in:
Shay Banon 2011-08-04 22:34:33 +03:00
parent ca6cd2bbed
commit f1e23067cd
2 changed files with 1 additions and 7 deletions

View File

@ -41,7 +41,7 @@ public class SingleFieldSelector implements ResetFieldSelector {
@Override public FieldSelectorResult accept(String fieldName) {
if (name.equals(fieldName)) {
return FieldSelectorResult.LOAD_AND_BREAK;
return FieldSelectorResult.LOAD;
}
return FieldSelectorResult.NO_LOAD;
}

View File

@ -32,8 +32,6 @@ import java.util.HashSet;
public class FieldMappersFieldSelector implements ResetFieldSelector {
private final HashSet<String> names = new HashSet<String>();
private int count;
public void add(String fieldName) {
names.add(fieldName);
@ -47,15 +45,11 @@ public class FieldMappersFieldSelector implements ResetFieldSelector {
@Override public FieldSelectorResult accept(String fieldName) {
if (names.contains(fieldName)) {
if (++count == names.size()) {
return FieldSelectorResult.LOAD_AND_BREAK;
}
return FieldSelectorResult.LOAD;
}
return FieldSelectorResult.NO_LOAD;
}
@Override public void reset() {
count = 0;
}
}