Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce weight based on comments #149

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading