metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

When an identifier is searched for in the "all" filter, too many results are returned

Open laurenwalker opened this issue 5 years ago • 5 comments

I was searching for a metadata doc that I just submitted by pasting the UUID into the "All" filter. (e.g. urn:uuid:2085065f-11b4-48a0-9f21-f8ae3325cf25).

This results in the query: -obsoletedBy:* AND -formatId:*dataone.org/collections* AND -formatId:*dataone.org/portals* AND urn\:uuid\:2085065f-11b4-48a0-9f21-f8ae3325cf25 AND formatType:METADATA

This returned thousands of results because the default field will match substrings. So any object with a matching identifier fragment is returned.

We should try to catch queries for identifiers (possibly just watch for urn:uuid and doi:prefixes), and wrap the identifier in quotes " so only exact matches are returned

laurenwalker avatar Apr 18 '20 00:04 laurenwalker

Interesting. Is the "All" filter just the top "Search" box? When I search exactly for a PID in that box, like https://pasta.lternet.edu/package/metadata/eml/knb-lter-jrn/210385004/17 or doi:10.18739/A21N7XN0C, or a UUID, I only get one (the correct) result. Am I doing something different here?

amoeba avatar Apr 18 '20 01:04 amoeba

Hmm, which environment did you search in?

laurenwalker avatar Apr 18 '20 01:04 laurenwalker

search.dataone.org:

Screen Recording 2020-04-17 at 5 45 21 PM

amoeba avatar Apr 18 '20 01:04 amoeba

Hmm, this might be a difference between the MN and CN Solr indexes, or the DataONE theme and non-DataONE themes. Because I can see what you're saying on search.dataone.org, but I can still reproduce this bug on the KNB. (Example: doi:10.5063/F1NP22S4.)

laurenwalker avatar Apr 18 '20 01:04 laurenwalker

Weird. Check out doi:10.18739/A2NG4GS10 on arcticdata.io. Works similar there.

amoeba avatar Apr 18 '20 02:04 amoeba