From 86665e59f0269d1e41ac88fba41a9099c454be6a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 4 Aug 2018 16:23:03 -0700 Subject: Dropping ElasticSearch in favor a single data file The entire dataset is fairly small (116 kB), so I'm dropping the ElasticSearch cluster in favor of just writing the whole dataset into a file in S3. This lambda will run every 15 minutes and the client side will pull it down and filter the results. --- .../groupsindexer/model/GroupsCollection.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/main/java/com/p4square/groupsindexer/model/GroupsCollection.java (limited to 'src/main/java/com/p4square/groupsindexer/model/GroupsCollection.java') diff --git a/src/main/java/com/p4square/groupsindexer/model/GroupsCollection.java b/src/main/java/com/p4square/groupsindexer/model/GroupsCollection.java new file mode 100644 index 0000000..de14239 --- /dev/null +++ b/src/main/java/com/p4square/groupsindexer/model/GroupsCollection.java @@ -0,0 +1,44 @@ +package com.p4square.groupsindexer.model; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.time.Instant; +import java.util.List; + +/** + * A list of groups and some metadata. + */ +public class GroupsCollection { + @JsonProperty("last-updated") + private Instant lastUpdated; + + @JsonProperty("groups") + private List groups; + + @JsonProperty("search-fields") + private List searchFields; + + public Instant getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(Instant lastUpdated) { + this.lastUpdated = lastUpdated; + } + + public List getGroups() { + return groups; + } + + public void setGroups(List groups) { + this.groups = groups; + } + + public List getSearchFields() { + return searchFields; + } + + public void setSearchFields(List searchFields) { + this.searchFields = searchFields; + } +} -- cgit v1.2.3