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

ACAS-710: Code table label text search and short name match query parameters #458

Merged
merged 5 commits into from
Apr 4, 2024

Conversation

brianbolt
Copy link
Contributor

@brianbolt brianbolt commented Apr 4, 2024

Description

  • Add code table/ddict value label text search which searches for label text and orders by a "best match"
  • Add code table/ddict value short name match which finds the ddict value based on short name in the same route
  • Added maxHits argument to limit results where the default is to not update.
  • Added indexes on label_text to facilitate faster search including tsvector and a lower varcharops which was new to me and handles both lower case seraches and wildcard like search cases:

The operator classes text_pattern_ops, varchar_pattern_ops, and bpchar_pattern_ops support B-tree indexes on the types text, varchar, and char respectively. The difference from the default operator classes is that the values are compared strictly character by character rather than according to the locale-specific collation rules. This makes these operator classes suitable for use by queries involving pattern matching expressions (LIKE or POSIX regular expressions) when the database does not use the standard “C” locale. As an example, you might index a varchar column like this:

CREATE INDEX test_index ON test_table (col varchar_pattern_ops);

Related Issue

ACAS-710

How Has This Been Tested?

  • Ran acasclient tests to verify compatability.
  • Uploaded thousands of data column/ column tree ls_type / ls_kind values to ddict value and verified the code table fields behaved properly in Experiment editor and protocol editor as well as those in each of the endpoint manage fields.
  • See related ACAS-710: Code value picklists type ahead search acas#1148 for demo video

Copy link
Collaborator

@bffrost bffrost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It's interesting to learn about the postgres searching functions. This looks like a reasonable API to allow both exact shortName lookups and text searching of label texts.

@brianbolt brianbolt changed the base branch from release/2024.2.x to release/2024.1.x April 4, 2024 19:10
@brianbolt brianbolt merged commit b7a2a0c into release/2024.1.x Apr 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants