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

Support token modifier ':text' #1732

Closed
lmsurpre opened this issue Nov 19, 2020 · 2 comments
Closed

Support token modifier ':text' #1732

lmsurpre opened this issue Nov 19, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request reindex Resolution of issue will require a $reindex during upgrade search showcase Used to Identify End-of-Sprint Demos

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Nov 19, 2020

from https://www.hl7.org/fhir/R4/search.html#token:

The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text. In this case, the search functions as a normal string search

Note: by "normal string search" I assume they mean it should be a "starts-with" and "case-insensitive" match.

example:

Search for any Condition with a code that has a text "headache" associated with it (either in the text, or a display)
GET [base]/Condition?code:text=headache |

@lmsurpre
Copy link
Member Author

lmsurpre commented Jan 19, 2021

I don't believe we even index these values today and it could be expensive (lots of new string values in our STR_VALUES tables).

No need to store it in original casing AND normalized casing like we do for other strings because you can't use an exact modifier with it. Will be cheaper to store it in the token_values tables in normalized/lowercase form and have special query logic to support the starts-with aspect.

There is a different issue for searching longer / more sophisticated text search: #481

@prb112 prb112 added the search label Feb 1, 2021
@tbieste tbieste self-assigned this Apr 2, 2021
@tbieste tbieste added enhancement New feature or request reindex Resolution of issue will require a $reindex during upgrade labels Apr 2, 2021
tbieste added a commit that referenced this issue Apr 2, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Apr 2, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
@tbieste tbieste added this to the Sprint 2021-05 milestone Apr 5, 2021
tbieste added a commit that referenced this issue Apr 5, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
lmsurpre added a commit that referenced this issue Apr 6, 2021
Issue #1732 - Support token modifier ':text'
@michaelwschroeder
Copy link
Contributor

Running against my local server with the latest codebase, I have performed token searches using the :text modifier against multiple fields and resources and have verified:

  • CodeableConcept.text and Coding.display fields have been indexed properly
  • search against TOKEN search parameters referencing those fields is case-insensitive and correct results are returned.

@tbieste tbieste added the showcase Used to Identify End-of-Sprint Demos label Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request reindex Resolution of issue will require a $reindex during upgrade search showcase Used to Identify End-of-Sprint Demos
Projects
None yet
Development

No branches or pull requests

4 participants