-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start hiding drafts after version 1.0 from public #3795
- introduced possibility multiple Solr documents per dataset
- Loading branch information
Showing
19 changed files
with
412 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#!/bin/bash | ||
# We assume you've done everything in scripts/search/tests/highlighting | ||
# and you have an unreleased dataset and file | ||
diff <(curl -s 'http://localhost:8080/api/datasets/17/versions/1?key=pete') scripts/search/tests/expected/dataset-versioning01raw | ||
#diff <(curl -s 'http://localhost:8080/api/datasets/17/versions/1?key=pete') scripts/search/tests/expected/dataset-versioning01raw | ||
# nick can see the dataset and file | ||
diff <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true&key=nick') scripts/search/tests/expected/highlighting-nick-trees | ||
# pete can see the dataset and file | ||
diff <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true&key=pete') scripts/search/tests/expected/highlighting-pete-trees | ||
# anon can't see the dataset and file | ||
diff <(curl -s 'http://localhost:8080/api/search?q=trees&showrelevance=true') scripts/search/tests/expected/dataset-versioning01anon | ||
# here's the solr doc for the dataset | ||
diff <(curl -s 'http://localhost:8983/solr/collection1/select?rows=100&wt=json&indent=true&q=id:dataset_17') scripts/search/tests/expected/dataset-versioning01dataset_17solr | ||
#diff <(curl -s 'http://localhost:8983/solr/collection1/select?rows=100&wt=json&indent=true&q=id:dataset_17') scripts/search/tests/expected/dataset-versioning01dataset_17solr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
{ | ||
"q":"trees", | ||
"fq_provided":"[]", | ||
"fq_actual":"[{!join from=groups_s to=perms_ss}id:group_public]", | ||
"total_count":0, | ||
"start":0, | ||
"count_in_response":0, | ||
"items":"[]", | ||
"relevance":[ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
{ | ||
"q":"trees", | ||
"fq_provided":"[]", | ||
"fq_actual":"[{!join from=groups_s to=perms_ss}id:group_public]", | ||
"total_count":2, | ||
"start":0, | ||
"count_in_response":2, | ||
"items":"[datafile_18:trees.png:18, dataset_17:Rings of Trees and Other Observations:17]", | ||
"relevance":[ | ||
{ | ||
"id":"datafile_18", | ||
"matched_fields":"[description]", | ||
"detailsArray":[ | ||
{ | ||
"description":[ | ||
"<span class=\"search-term-match\">Trees</span> are lovely." | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"id":"dataset_17", | ||
"matched_fields":"[title, citation_t, description, notesText, authorAffiliation, keyword, contributorName]", | ||
"detailsArray":[ | ||
{ | ||
"title":[ | ||
"Rings of <span class=\"search-term-match\">Trees</span> and Other Observations" | ||
] | ||
}, | ||
{ | ||
"citation_t":[ | ||
"Tree, Tony, 2014, \"Rings of <span class=\"search-term-match\">Trees</span> and Other Observations\", http://dx.doi.org/10.5072/FK2/17, Root" | ||
] | ||
}, | ||
{ | ||
"description":[ | ||
"<span class=\"search-term-match\">Trees</span> have rings. <span class=\"search-term-match\">Trees</span> can be tall." | ||
] | ||
}, | ||
{ | ||
"notesText":[ | ||
"Many notes have been taken about <span class=\"search-term-match\">trees</span> over the years." | ||
] | ||
}, | ||
{ | ||
"authorAffiliation":[ | ||
"<span class=\"search-term-match\">Trees</span> Inc." | ||
] | ||
}, | ||
{ | ||
"keyword":[ | ||
"<span class=\"search-term-match\">trees</span>" | ||
] | ||
}, | ||
{ | ||
"contributorName":[ | ||
"Edward <span class=\"search-term-match\">Trees</span> Jr." | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
scripts/search/tests/expected/dataset-versioning03pete-both
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
{ | ||
"q":"trees", | ||
"fq_provided":"[]", | ||
"fq_actual":"[({!join from=groups_s to=perms_ss}id:group_public OR {!join from=groups_s to=perms_ss}id:group_user1)]", | ||
"total_count":6, | ||
"start":0, | ||
"count_in_response":6, | ||
"items":"[datafile_18:trees.png:18, dataset_17:Rings of Trees and Other Observations:17, dataset_17_draft:Rings of Conifers and Other Observations:17, dataverse_10:Birds:10, dataverse_11:Trees:11, dataverse_16:Chestnut Trees:16]" | ||
} |
10 changes: 10 additions & 0 deletions
10
scripts/search/tests/expected/dataset-versioning03pete-published-only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
{ | ||
"q":"trees", | ||
"fq_provided":"[published_s:Published]", | ||
"fq_actual":"[published_s:Published, ({!join from=groups_s to=perms_ss}id:group_public OR {!join from=groups_s to=perms_ss}id:group_user1)]", | ||
"total_count":2, | ||
"start":0, | ||
"count_in_response":2, | ||
"items":"[datafile_18:trees.png:18, dataset_17:Rings of Trees and Other Observations:17]" | ||
} |
10 changes: 10 additions & 0 deletions
10
scripts/search/tests/expected/dataset-versioning03pete-unpublished-only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
{ | ||
"q":"trees", | ||
"fq_provided":"[published_s:Unpublished]", | ||
"fq_actual":"[published_s:Unpublished, ({!join from=groups_s to=perms_ss}id:group_public OR {!join from=groups_s to=perms_ss}id:group_user1)]", | ||
"total_count":4, | ||
"start":0, | ||
"count_in_response":4, | ||
"items":"[dataset_17_draft:Rings of Conifers and Other Observations:17, dataverse_10:Birds:10, dataverse_11:Trees:11, dataverse_16:Chestnut Trees:16]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
|
||
{ | ||
"q":"trees", | ||
"fq_provided":"[]", | ||
"fq_actual":"[({!join from=groups_s to=perms_ss}id:group_public OR {!join from=groups_s to=perms_ss}id:group_user1)]", | ||
"total_count":5, | ||
"start":0, | ||
"count_in_response":5, | ||
"items":"[datafile_18:trees.png:18, dataset_17_draft:Rings of Trees and Other Observations:17, dataverse_10:Birds:10, dataverse_11:Trees:11, dataverse_16:Chestnut Trees:16]", | ||
"relevance":[ | ||
{ | ||
"id":"datafile_18", | ||
"matched_fields":"[description]", | ||
"detailsArray":[ | ||
{ | ||
"description":[ | ||
"<span class=\"search-term-match\">Trees</span> are lovely." | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"id":"dataset_17_draft", | ||
"matched_fields":"[title, citation_t, description, notesText, authorAffiliation, keyword, contributorName]", | ||
"detailsArray":[ | ||
{ | ||
"title":[ | ||
"Rings of <span class=\"search-term-match\">Trees</span> and Other Observations" | ||
] | ||
}, | ||
{ | ||
"citation_t":[ | ||
"Tree, Tony, <2014>, \"Rings of <span class=\"search-term-match\">Trees</span> and Other Observations\", http://dx.doi.org/10.5072/FK2/17" | ||
] | ||
}, | ||
{ | ||
"description":[ | ||
"<span class=\"search-term-match\">Trees</span> have rings. <span class=\"search-term-match\">Trees</span> can be tall." | ||
] | ||
}, | ||
{ | ||
"notesText":[ | ||
"Many notes have been taken about <span class=\"search-term-match\">trees</span> over the years." | ||
] | ||
}, | ||
{ | ||
"authorAffiliation":[ | ||
"<span class=\"search-term-match\">Trees</span> Inc." | ||
] | ||
}, | ||
{ | ||
"keyword":[ | ||
"<span class=\"search-term-match\">trees</span>" | ||
] | ||
}, | ||
{ | ||
"contributorName":[ | ||
"Edward <span class=\"search-term-match\">Trees</span> Jr." | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"id":"dataverse_10", | ||
"matched_fields":"[description]", | ||
"detailsArray":[ | ||
{ | ||
"description":[ | ||
"A bird dataverse with some <span class=\"search-term-match\">trees</span>" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"id":"dataverse_11", | ||
"matched_fields":"[name]", | ||
"detailsArray":[ | ||
{ | ||
"name":[ | ||
"<span class=\"search-term-match\">Trees</span>" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"id":"dataverse_16", | ||
"matched_fields":"[description, name]", | ||
"detailsArray":[ | ||
{ | ||
"description":[ | ||
"A dataverse with chestnut <span class=\"search-term-match\">trees</span> and an oriole" | ||
] | ||
}, | ||
{ | ||
"name":[ | ||
"Chestnut <span class=\"search-term-match\">Trees</span>" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.