Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30656

Enable escape of '*' character in MatchPhrasePrefix ES queries

    XMLWordPrintable

    Details

      Description

      It is not possible to escape the "*" wildcard character in Elasticsearch-enabled NXQL queries, making it impossible to make specific MatchPhrasePrefix queries on terms that use the character.

      Steps to reproduce:

      1. Configure ES indexing to enable ILIKE queries on some test field (e.g. dc:title, or a String field from a custom schema)
      2. Add nxql_search to the list of page providers in elasticsearch.override.pageproviders in nuxeo.conf
      3. After starting nuxeo, create a set of documents with varying values for the term:
        -TestWild
        -TestWild*
      4. Add the following term to the query (attempting to escape '*' character) and run search:
        AND [testproperty] ILIKE 'TestWild\\*'
        

      Expected Result:
      Query returns one result with 'TestWild*' value

      Actual Result:
      Query returns all entries beginning with 'TestWild', as if '*' character was not escaped

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: