HashedStringsFacetCollector.OUTPUT_MODE output_mode = null;
TIntHashSet excluded = new TIntHashSet();
TIntHashSet included = new TIntHashSet();
TermsFacet.ComparatorType comparatorType = TermsFacet.ComparatorType.COUNT;
String currentFieldName = null;
XContentParser.Token token;
while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
if (token == XContentParser.Token.FIELD_NAME) {
currentFieldName = parser.currentName();
} else if (token == XContentParser.Token.START_ARRAY) {
if ("exclude".equals(currentFieldName)) {
while ((token = parser.nextToken()) != XContentParser.Token.END_ARRAY) {
if (token == XContentParser.Token.VALUE_NUMBER) {
excluded.add(parser.intValue());
} else
excluded.add(HashedStringFieldType.hashCode(parser.text()));
}
}
else if ("include".equals(currentFieldName)) {
while ((token = parser.nextToken()) != XContentParser.Token.END_ARRAY) {
if (token == XContentParser.Token.VALUE_NUMBER) {
included.add(parser.intValue());
} else
included.add(HashedStringFieldType.hashCode(parser.text()));
}
}
} else if (token.isValue()) {
if ("field".equals(currentFieldName)) {
field = parser.text();