Closed alinai closed 3 years ago
@alinai There are steps missing. At what point in the sequence do you select the "Contains" button?
Do not answer here. Please update the ticket.
The ticket has been updated!
Digging more into this issue: Example where contains does not return anything 1.Select contains
Now, if switched back to 'starts with' it will spit out result, which is an exact term. Prod returns any term that is selected from 'contains' autosuggested list and so does the Glossary (note for Glossary API returns a result, where as in drug it comes empty)
Example where contains returns one result 1.Select contains
This occurs because the ES mapping document imposes a limit of 30 characters on the ngram_filter
which is used for contains
searches.
Solution 1: Increase the ngram_max
value to accommodate longer names. The current maximum term name size is 685 characters. Setting ngram_filter
to allow that would increase the size of the index from 71 MB to 510, so that's not a good solution.
Solution two: Adjust the ngram_filter
to use a larger max_gram
value. (Tentatively, 100 characters.) If the user enters a string longer than that, do a search based on the first X number of characters. Ideally, this would only apply to contains search as begins is not affected by this issue. (This value would need to be configurable, but with a default so we don't have to remember to configure it for the deployment.)
Solution three: Adjust the elasticsearch to return any exact matches which would match the autosuggest's query. This would fix the issue for the specific case of a term selected from autosuggest, but would fail for anything longer than the max_gram
value which was not an exact match.
After discussion with @blairlearn, @VictoriaSunNIH, @zhuomingao, @blilianyu, and @mworrest, the decision was to go with solution #2.
Issue description
Description of the issue On performing search using "len" and then selecting "anti-CD22 scFv TCRz:41BB-CAR lentiviral vector-transduced autologous T lymphocytes" from the autosuggest using a contains search on react-dev, when we select and submit this term, we do not get any search result.
Steps to reproduce the issue
What's the expected result?
-
What's the actual result?
-
Additional details / screenshot
Related Tickets