Skip to content

Commit

Permalink
Merge pull request #149 from aodn/features/5233-reduce-desc-weight
Browse files Browse the repository at this point in the history
Reduce weight based on comments
  • Loading branch information
utas-raymondng authored Oct 3, 2024
2 parents 0e72b33 + dd28cb8 commit 3682db8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public Integer evaluateCompleteness(StacCollectionModel stacCollectionModel) {
// Abstract
if (stacCollectionModel.getDescription() != null && !stacCollectionModel.getDescription().isBlank()) {
log.debug("Description found");
total += (int) (stacCollectionModel.getDescription().length() * descriptionWeigth);
int w = (int) (stacCollectionModel.getDescription().length() * descriptionWeigth);
total += Math.min(w, 25);
}
// Links
if (stacCollectionModel.getLinks() != null && !stacCollectionModel.getLinks().isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion indexer/src/test/resources/canned/sample6_stac.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
]
},
"summaries": {
"score": 107,
"score": 100,
"status": "completed",
"credits": [
"Data collected on the Marine National Facility (MNF) RV Investigator voyage IN2024_V01.",
Expand Down
2 changes: 1 addition & 1 deletion indexer/src/test/resources/canned/sample7_stac.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"temporal" : [ [ "2021-09-30T14:00:00Z", "2022-12-31T12:59:59Z" ], [ "2021-09-30T14:00:00Z", "2022-12-31T12:59:59Z" ] ]
},
"summaries" : {
"score" : 71,
"score" : 70,
"status" : "completed",
"credits" : [ "This data was collected by the 'Field integrated testing project' of EcoRRAP. We thank all team members, students, and volunteers for their efforts.", "The Reef Restoration and Adaptation Program is funded by the partnership between the Australian Government’s Reef Trust and the Great Barrier Reef Foundation." ],
"scope" : {
Expand Down

0 comments on commit 3682db8

Please sign in to comment.