Permalink
Browse files

Major performance optimization: Queries now nest the attributes of al…

…l resolvers as a tree, rather than a list of lists, to eliminate redundant clauses. Each object in the "queries" field of the response now includes details about the _hop, _index, and resolvers of the query. The "_source" field is now moved under the "_attributes" field for better readability.
  • Loading branch information...
davemoore- committed Apr 16, 2018
1 parent 7cd4ae9 commit f425f4f4c77a4b734923cbbeb418cca42e928957
@@ -15,7 +15,7 @@
private static final Pattern REGEX_EMPTY = Pattern.compile("^\\s*$");
private final String name;
private ArrayList<String> attributes = new ArrayList<>();
private HashSet<String> attributes = new HashSet<>();
public Resolver(String name, JsonNode json) throws ValidationException {
validateName(name);
@@ -33,13 +33,13 @@ public String name() {
return this.name;
}
public ArrayList<String> attributes() {
public HashSet<String> attributes() {
return this.attributes;
}
public void attributes(JsonNode value) throws ValidationException {
validateAttributes(value);
ArrayList<String> attributes = new ArrayList<>();
HashSet<String> attributes = new HashSet<>();
for (JsonNode attribute : value)
attributes.add(attribute.textValue());
this.attributes = attributes;
Oops, something went wrong.

0 comments on commit f425f4f

Please sign in to comment.