molgenis / molgenis-emx2

MOLGENIS EMX2, the latest version of the MOLGENIS data platform.
GNU Lesser General Public License v3.0
11 stars 16 forks source link

fix: search should work as (term1 and term2) #3865

Closed mswertz closed 1 week ago

mswertz commented 3 weeks ago

closes #3850

What are the main changes you did:

how to test:

todo:

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
90.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

EleanorHyde-UMCG commented 3 weeks ago

I can't get it to work in prev (no. 3865).

testdata in DEV: 'adhd' in search bar --> 14 variables 'maternal' in search bar --> 710 variables 'maternal adhd' and 'adhd maternal' in the search bar should give the same results i.e. somewhere between 710 and (710+14) variables (depending on how many match both criteria, impossible to know with this test data)

mswertz commented 3 weeks ago

I can't get it to work in prev (no. 3865).

testdata in DEV: 'adhd' in search bar --> 14 variables 'maternal' in search bar --> 710 variables 'maternal adhd' and 'adhd maternal' in the search bar should give the same results i.e. somewhere between 710 and (710+14) variables (depending on how many match both criteria, impossible to know with this test data)

https://preview-emx2-pr-3865.dev.molgenis.org/catalogue-demo/ssr-catalogue/all/variables?page=1&conditions=[{%22id%22:%22search%22,%22search%22:%22adhd+mother%22}]

gives the desired results?

EleanorHyde-UMCG commented 3 weeks ago

I can't get it to work in prev (no. 3865). testdata in DEV: 'adhd' in search bar --> 14 variables 'maternal' in search bar --> 710 variables 'maternal adhd' and 'adhd maternal' in the search bar should give the same results i.e. somewhere between 710 and (710+14) variables (depending on how many match both criteria, impossible to know with this test data)

https://preview-emx2-pr-3865.dev.molgenis.org/catalogue-demo/ssr-catalogue/all/variables?page=1&conditions=[{%22id%22:%22search%22,%22search%22:%22adhd+mother%22}]

gives the desired results?

The filter works well and gives the same answer whether you put "termA termB" or "termB termA", only I just need to check why testvarNoRepeats is now shown (not aware that the word 'mother' is used on that one, but I'll check).

EleanorHyde-UMCG commented 3 weeks ago

testvarNorepeats does not have the word 'mother' anywhere in it as far as I can see. If the search bar ALSO searches in the keywords, then you could use the following test data and test the different combinations of words entered:

image

mswertz commented 3 weeks ago

testvarNorepeats does not have the word 'mother' anywhere in it as far as I can see. If the search bar ALSO searches in the keywords, then you could use the following test data and test the different combinations of words entered:

image

The search looks in columns of Variables table (and its superclass) as well as in the columns of the ontology terms that are referred (e.g. if the word is in description of an areas of information than it will be found)

mswertz commented 2 weeks ago

Actually, keyword=Language also matches 'mother', see https://preview-emx2-pr-3865.dev.molgenis.org/CatalogueOntologies/tables/#/Keywords and then search for 'mother' because of 'mother tongue'

So not a bug in software unless we want to reduce the query expansion to exclude the descriptions of keywords.

EleanorHyde-UMCG commented 2 weeks ago

Tested in prev 3865.
Search bar: "var" --> 132 variables, including non-test variables and all the test variables Search bar: "var test" --> 20 variables, including non-test variables and all the test variables Search bar: "var test vir" --> only 2 variables, both test variables with 'vir' in the name (and Virology as keyword)