Skip to content

Commit

Permalink
some improved mapping types for new index values
Browse files Browse the repository at this point in the history
  • Loading branch information
naknomum committed Jan 28, 2025
1 parent dcd52f1 commit 42a87f6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main/java/org/ecocean/Encounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -4291,11 +4291,14 @@ public void opensearchDocumentSerializer(JsonGenerator jgen, Shepherd myShepherd
if (occ.getIndividualCount() != null)
jgen.writeNumberField("occurrenceIndividualCount", occ.getIndividualCount());
if (occ.getMinGroupSizeEstimate() != null)
jgen.writeNumberField("occurrenceMinGroupSizeEstimate", occ.getMinGroupSizeEstimate());
jgen.writeNumberField("occurrenceMinGroupSizeEstimate",
occ.getMinGroupSizeEstimate());
if (occ.getMaxGroupSizeEstimate() != null)
jgen.writeNumberField("occurrenceMaxGroupSizeEstimate", occ.getMaxGroupSizeEstimate());
jgen.writeNumberField("occurrenceMaxGroupSizeEstimate",
occ.getMaxGroupSizeEstimate());
if (occ.getBestGroupSizeEstimate() != null)
jgen.writeNumberField("occurrenceBestGroupSizeEstimate", occ.getBestGroupSizeEstimate());
jgen.writeNumberField("occurrenceBestGroupSizeEstimate",
occ.getBestGroupSizeEstimate());
if (occ.getBearing() != null)
jgen.writeNumberField("occurrenceBearing", occ.getBearing());
if (occ.getDistance() != null)
Expand Down Expand Up @@ -4382,6 +4385,8 @@ public org.json.JSONObject opensearchMapping() {
"{\"type\": \"keyword\", \"normalizer\": \"wildbook_keyword_normalizer\"}");
map.put("date", new org.json.JSONObject("{\"type\": \"date\"}"));
map.put("dateSubmitted", new org.json.JSONObject("{\"type\": \"date\"}"));
map.put("individualTimeOfBirth", new org.json.JSONObject("{\"type\": \"date\"}"));
map.put("individualTimeOfDeath", new org.json.JSONObject("{\"type\": \"date\"}"));
map.put("locationGeoPoint", new org.json.JSONObject("{\"type\": \"geo_point\"}"));
map.put("occurrenceLocationGeoPoint", new org.json.JSONObject("{\"type\": \"geo_point\"}"));

Expand All @@ -4392,6 +4397,8 @@ public org.json.JSONObject opensearchMapping() {
map.put("occurrenceId", keywordType);
map.put("state", keywordType);
map.put("submitterUserId", keywordType);
map.put("individualTaxonomy", keywordType);
map.put("individualId", keywordType);

// all case-insensitive keyword-ish types
map.put("locationId", keywordNormalType);
Expand Down

0 comments on commit 42a87f6

Please sign in to comment.