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

Search engine studies #20

Merged
merged 41 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5108b82
Initial support for screen/project attributes search form
will-moore Sep 8, 2022
28d0417
Fix handling of 'resource' for project, screen etc
will-moore Sep 28, 2022
4276e88
Merge remote-tracking branch 'origin/master' into search_engine_studies
will-moore Nov 17, 2022
08d0a6f
prettier fixes
will-moore Nov 17, 2022
602a643
Auto-complete 'Any' searches container Name and Description
will-moore Nov 26, 2022
439a9f4
Fix auto-complete for Name/Description
will-moore Nov 28, 2022
301eaaf
Search for 'container' instead of project/screen. Show Study in Attri…
will-moore Nov 28, 2022
ad73bf9
prettier fixes
will-moore Nov 28, 2022
d31db87
Don't alert() if no results. Display instead
will-moore Nov 28, 2022
cea6325
Don't include Description for auto-complete terms
will-moore Nov 29, 2022
c574b70
Ignore annotation.csv KV pairs from auto-complete results
will-moore Nov 29, 2022
edab857
Use 'name' instead of 'Name (IDR number)' for search_engine API
will-moore Dec 5, 2022
8b24932
Don't show 'name' in Attribute chooser
will-moore Dec 5, 2022
8ea2b7c
Move autocomplete functionality to reusable function
will-moore Dec 7, 2022
87e417d
Fix sorting of autocomplete results by image, screen OR project counts
will-moore Dec 7, 2022
d8ee001
Use 'experiment' instead of 'project' in autocomplete
will-moore Dec 7, 2022
fc3b853
Use result.count for autocomplete display
will-moore Dec 7, 2022
8ce5b62
Generate auto-complete results grouped by key - console.log only
will-moore Dec 7, 2022
9743a5d
Handle redirect for non-mapr queries on studies
will-moore Dec 7, 2022
52ed6ab
Use resource:container for loading study images
will-moore Dec 7, 2022
5e68658
Use 'contains' for Image-attribute redirects
will-moore Dec 8, 2022
9119e95
Switch operator order in UI, contains first default
will-moore Dec 9, 2022
3e38c34
Show operator in auto-complete. Set operator if not 'Any' key
will-moore Dec 9, 2022
4aaa8e6
Front page filter studies by Name, not by annotation.csv
will-moore Dec 9, 2022
b63d6c4
Fix result.count when summarising autocomplete for 'name'
will-moore Dec 14, 2022
da5ea63
Handle redirect Name to name
will-moore Jan 10, 2023
0f7b81f
Use arrow function to avoid prettier conflict
will-moore Jan 10, 2023
5d8c998
Fix projects -> experiments in auto-complete
will-moore Jan 24, 2023
8b02b16
prettier fix
will-moore Jan 24, 2023
4b6b3d2
Replace 'study' with 'experiment/screen' in autocomplete and results
will-moore Jan 25, 2023
2809efb
Fix 'undefined' operator in autocomplete
will-moore Jan 25, 2023
479a430
prettier
will-moore Jan 25, 2023
6e210ac
Combine project and screen hits in autocomplete
will-moore Jan 27, 2023
62b359f
Fix autocomplete contains experiments/screens, update 'type' when com…
will-moore Jan 30, 2023
774021a
Don't search with 'Any' for key
will-moore Jan 30, 2023
705bbe7
Autocomplete results count greater-than if 'contains'
will-moore Jan 30, 2023
ef6c120
prettier fixes
will-moore Jan 30, 2023
1c7601b
Fix type in autocomplete for first line 'contains'
will-moore Jan 30, 2023
595fc1f
Fix the combining of multiple auto-complete types for 'Any' first item
will-moore Jan 30, 2023
596d916
Hide stale auto-complete results on keyup (except arrows)
will-moore Jan 31, 2023
5c31a23
Disable default form submission handling
will-moore Jan 31, 2023
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
9 changes: 8 additions & 1 deletion idr_gallery/static/idr_gallery/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ class StudiesModel {
}

filterStudiesAnyText(text) {
// Search for studies with text in their keys, values, or description.
// Search for studies with text in their keys, values, name or description.
// Returns a list of matching studies. Each study is returned along with kvps that match text
// [study, [{key: value}, {Description: this study is great}]]

Expand All @@ -393,6 +393,13 @@ class StudiesModel {
let keyValuePairs = [];
if (study.mapValues) {
keyValuePairs = [...study.mapValues];

// Don't want to find "annotation.csv" KVPs
keyValuePairs = keyValuePairs.filter(
(kvp) => !kvp[1].includes("annotation.csv")
);

keyValuePairs.push(["Name", study.Name]);
}
keyValuePairs.push(["Description", study.StudyDescription]);
let match = keyValuePairs.some((kvp) => regex.test(kvp[1]));
Expand Down
Loading