Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find a concept by its id or code #2113

Closed
ttemnikova opened this issue Oct 6, 2022 · 5 comments · Fixed by #2114
Closed

Cannot find a concept by its id or code #2113

ttemnikova opened this issue Oct 6, 2022 · 5 comments · Fixed by #2114
Assignees
Labels
Milestone

Comments

@ttemnikova
Copy link

Expected behavior

The search works both with concept names and ids/codes

Actual behavior

NO RESULTS FOUND FOR "<id/code>"

Steps to reproduce behavior

Login
Go to Search
Look for a concept by its id or code (e.g. 1112807)

@anton-abushkevich anton-abushkevich self-assigned this Oct 6, 2022
@anton-abushkevich anton-abushkevich added this to the V2.12 milestone Oct 6, 2022
@chrisknoll
Copy link
Collaborator

There was a recent change where we won't search by concept_id if the input string isn't numeric. Meaning: the WHERE concept_id = 'query' is not performed if the input string isn't numeric.

There may be an issue in the logic where the check is reversed (ie: it won't search for concept_id if it is numeric) but I thought this was tested. Let me confirm.

@anton-abushkevich
Copy link
Contributor

Addition: search by concept ID with Solr woks fine. The problem seems to be only with direct DB search.

@chrisknoll
Copy link
Collaborator

Ok, Thanks. Very odd since that was the main way I tested the change :( Let me dig into it.

@chrisknoll
Copy link
Collaborator

I found this error in the log:

Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = character varying
  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.

Very strange that I did not see this before when I tested for with/without conceptID query. But I'll apply necessary casts.

@chrisknoll
Copy link
Collaborator

chrisknoll commented Oct 6, 2022

Fix Submitted. This was sloppy testing on my part. When I had the original query working, I found that I could make the conceptID optional if the query is numeric. My test was to perform with and without numeric query and observe the query dropped the additional criteria, but I didn't confirm the execution result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants