Stored fields with multiple values might not return in search request asking for them, closes #1208.
This commit is contained in:
parent
ca6cd2bbed
commit
f1e23067cd
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue