ome / omero_search_engine_client

Client for the Omero Search Engine
GNU Affero General Public License v3.0
0 stars 4 forks source link

search values with Key and Value for autocomplete #7

Closed will-moore closed 2 years ago

will-moore commented 2 years ago

I'm using this endpoint to provide auto-complete for "Any" value serachusingvaluesonly/?value=pdx&resource=image

Screenshot 2022-04-07 at 15 52 40

which is nice as it gives counts for the results. (also at https://github.com/ome/omero_search_engine_client/pull/4)

{
"results": [
  {
    "Attribute": "Gene Symbol",
    "Number of images": 1039,
    "Value": "pdxdc1"
  },

But when it comes to auto-complete for a particular key, we use: get_values/?key=Gene%20Symbol&resource=image which doesn't filter by any value and doesn't have any counts.

It would be nice to have an endpoint like serachusingvaluesonly but using "key" too.

khaledk2 commented 2 years ago

There is an endpoint (serachforvaluesusingkey) that returns what you want, For example, to get the available values for the Organism attribute, you can use this link: https://idr-testing.openmicroscopy.org/searchengine/serachforvaluesusingkey/?key=Organism&&resource=image

khaledk2 commented 2 years ago

It has a typo fix and should be searchforvaluesusingkey

will-moore commented 2 years ago

Ah - OK, I see that has the counts, but it doesn't allow me to filter by Value, so it's not going to work for autocomplete. E.g. https://idr-testing.openmicroscopy.org/searchengine/searchforvaluesusingkey/?key=Compound%20Name&&resource=image has 1856590 items, but only the first 9999 are returned so I can't filter in the JS code.

will-moore commented 2 years ago

Moved this to https://github.com/ome/omero_search_engine/issues/11