TextpressoDevelopers / textpressocentral

Textpressocentral frontend web application
Other
2 stars 2 forks source link

Bug: keyword searches with 2 or more keywords connected by OR and a category selected returning limited results #35

Closed chris-grove closed 3 years ago

chris-grove commented 3 years ago

I noticed that if I perform a TPC search using two or more keywords connected by the OR boolean operator along with a category search, I get unexpected results and apparently the order of keywords matters.

For example, if I enter a single keyword:

"daf-2"

and select the category "phenotypic perturbation" and use the "Sentence" search scope I get back 2763 documents with 22578 matching sentences. If I instead use the keyword "Y55D5A.5" (the sequence name for daf-2) I get back 7 documents with 9 matching sentences. If I now enter both keywords like this:

"daf-2" OR "Y55D5A.5"

I get back the same 7 documents with 9 matching sentences as with "Y55D5A.5" alone. If I then reverse the keyword order:

"Y55D5A.5" OR "daf-2"

I get back 2763 documents with 22578 matching sentences (same as with "daf-2" alone). It seems that when the OR operator is applied, it is just returning results as if there is just the second keyword.

This feels like a bug so I'm reporting it. Is this the intended behavior? If so, I think it should be corrected so that a user gets back the union of both searches.

goldturtle commented 3 years ago

Fixed @ http://celegans.textpressocentral.org

chris-grove commented 3 years ago

@goldturtle Yep! Looks good! Thanks!