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

Repository LIKE queries should be anchored on MongoDB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.10-HF20, 10.3
    • Component/s: Core MongoDB
    • Release Notes Summary:
      The property nuxeo.mongodb.like.anchored enables the fact that on MongoDB a LIKE match anchors its search.
    • Impact type:
      Configuration Change
    • Upgrade notes:
      Hide

      For MongoDB queries, the LIKE queries are now anchored by default on master. This can be reverted to the old behavior using:

        <require>org.nuxeo.ecm.core.storage.mongodb.configuration</require>
        <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
           <documentation>
             Property to disable the fact that on MongoDB a LIKE match anchors its search
             (like in SQL databases), i.e., absent wildcards, it does not match in the middle of a string.
      
             When true, does not match in the middle of a string.
             When false, works as if there was a % on each side of the LIKE expression.
      
             @since 10.3
           </documentation>
           <!-- default is false for 9.10 and earlier -->
           <property name="nuxeo.mongodb.like.anchored">false</property>
         </extension>
      

      Conversely, this can be set to true on 9.10 if anchoring is required.

      Show
      For MongoDB queries, the LIKE queries are now anchored by default on master. This can be reverted to the old behavior using: <require> org.nuxeo.ecm.core.storage.mongodb.configuration </require> <extension target= "org.nuxeo.runtime.ConfigurationService" point= "configuration" > <documentation> Property to disable the fact that on MongoDB a LIKE match anchors its search (like in SQL databases), i.e., absent wildcards, it does not match in the middle of a string. When true, does not match in the middle of a string. When false, works as if there was a % on each side of the LIKE expression. @since 10.3 </documentation> <!-- default is false for 9.10 and earlier --> <property name= "nuxeo.mongodb.like.anchored" > false </property> </extension> Conversely, this can be set to true on 9.10 if anchoring is required.
    • Sprint:
      nxFG 10.3.7, nxFG 10.3.8
    • Story Points:
      2

      Description

      A repository (not Elasticsearch) search with LIKE should be anchored, i.e., it must not match the middle of a string (this is the SQL and therefore NXQL semantics).

      This currently fails on MongoDB: ... LIKE 'bar' currently matches foobarbaz but it shouldn't.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m