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

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



    • Core: F - Sprint 90, Core: F - Sprint 91
    • 3
    • Prokopovych
    • High


      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


          Issue Links



                felkerk Kyle Felker
                julianladisch Julian Ladisch
                Julian Ladisch Julian Ladisch
                0 Vote for this issue
                3 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases