Uploaded image for project: 'ui-users'
  1. ui-users
  2. UIU-681

QueryValidationException: CQL: only right truncation supported for id: *foo*

    XMLWordPrintable

    Details

    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      Core: F - Sprint 90, Core: F - Sprint 91
    • Story Points:
      3
    • Development Team:
      Prokopovych
    • Confidence factor:
      High

      Description

      Open Users App start page on folio-testing.
      Enter *foo into the search slot and press enter or click on Search.
      Expected result: searches for strings that contain foo.
      Actual result: Error popup with this message:

      ERROR: in module @folio/users, operation GET on resource 'records' failed, saying: CQL Illegal State Error for '(((username="*foo*" or personal.firstName="*foo*" or personal.lastName="*foo*" or personal.email="*foo*" or barcode="*foo*" or id="*foo*" or externalSystemId="*foo*")) and active="true") sortby personal.lastName personal.firstName': org.z3950.zing.cql.cql2pgjson.QueryValidationException: CQL: only right truncation supported for id:  *foo*
      

      The wording of the error message has slightly changed since this issue has been reported. Current wording (May 2020):

      ERROR: in module @folio/users, operation GET on resource 'records' failed, saying: org.folio.cql2pgjson.exception.QueryValidationException: * right truncation wildcard must be followed by space or end of string, but found *
      

      It was decided on https://issues.folio.org/browse/CQLPG-71 and https://issues.folio.org/browse/CQLPG-58 that the front-end must do special handing on the id field. This includes not sending a left truncation query on the id field. See documentation: https://github.com/folio-org/cql2pgjson-java#id

      For all other fields the b-tree indexes "index" and "uniqueIndex" and the full text index "fullTextIndex" only support right truncation. See https://github.com/folio-org/mod-users/blob/master/src/main/resources/templates/db_scripts/schema.json which indexes exist. Consider to completely disallow all left truncation and all in-word truncation like foo*bar and only allow right truncation for all fields. This will ensure short response times.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                felkerk Kyle Felker
                Reporter:
                julianladisch Julian Ladisch
                Front End Estimator:
                Julian Ladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases