fields = RuleNormalizer.RuleField.ALL_KEYS;
}
- //TODO limit source for available fields.
- //esSearch.addFields(fields.toArray(new String[fields.size()]));
- //esSearch.setSource(StringUtils.join(fields, ','));
+ esSearch.setFetchSource(fields.toArray(new String[fields.size()]),null);
return esSearch;
}
esSearch.setQuery(QueryBuilders.filteredQuery(qb, fb));
+ System.out.println("esSearch = " + esSearch);
+
SearchResponse esResult = esSearch.get();
+ System.out.println("esResult = " + esResult);
return new RuleResult(esResult);
}
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
-import org.junit.Ignore;
import org.junit.Test;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
}
@Test
- @Ignore
public void select_doc_fields_to_return() {
dao.insert(newRuleDto(RuleKey.of("javascript", "S001")), dbSession);
dbSession.commit();