IDR / idr-gallery

https://pypi.org/project/idr-gallery/
GNU Affero General Public License v3.0
1 stars 1 forks source link

Auto-complete improvements, support "Any" attribute #30

Open will-moore opened 1 year ago

will-moore commented 1 year ago

This aims to address 2 issues:

auto-complete is filtered by Attribute field

If you start with "Any" attribute (default) and enter search into the Value field, the auto-complete gives a list with many different Attributes:

Screenshot 2023-03-22 at 12 21 46

If you pick one e.g. Antibody contains pax6, then decide you wanted to pick a different one, you re-enter pax6 into the search field, but now you only see this (even though you never chose to filter these, since the Attribute field got changed when you picked the item above, and now it's filtering by that):

Screenshot 2023-03-22 at 12 23 37

we can now search by Any key

See https://github.com/ome/omero_search_engine/pull/83

Previously you could only auto-complete with 'Any' key, but we needed to pick a specific Key to actually search.

Currently, there's no way to pick "pax6 with ANY key" from this list:

Screenshot 2023-03-22 at 14 11 14

Proposed changes:

contain pax6
--------------------------
Gene Symbol
Antibody
HGNC Gene Symbol
Nearest Human Holologue
Original Gene Target
Gene Symbol Synonyms
--------------------------
Study Attributes
--------------------------
Imaging Method
...
will-moore commented 1 year ago

If we group all auto-complete results by Value, then when we have entered "pax" we will see something like:

pax (9 images, Gene Symbol)
pax6 (2345 images, Gene Symbol, Antibody, HGNC G...)
pax7 (1234 images, Gene Symbol, Antibody, HGNC G...)
pax3 (1234 images, Gene Symbol, Antibody, HGNC G...)
...

Picking any of these would search by e.g. Key: any, Value: pax6

If the value isn't found in multiple Keys, then the auto-complete results would appear much as they do now.

NB: if any value matches Screens and Experiments, they will be grouped as they are now. If any value matches Images and Screens/Experiments, they will need to appear as separate items...

Although the "Attribute" chooser is not updated when we choose an auto-complete, we still need to know whether to search by Container or Images.