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

Find a solution to bypass the limitation to 50 results when using LIKE/ILIKE operators

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2021.0
    • Fix Version/s: None
    • Component/s: Elasticsearch

      Description

      Pre-requisite: the page provider nxql_search must run against Elasticsearch and the ILIKE must be configured in the ES mapping

      Steps to reproduce:

      1. in a Folder, create 100+ documents whose title starts with BAR (like BAR001, BAR002, ... BAR050, ... BAR100, ...)
      2. go to the NXQL search and run this NXQL query
        SELECT * FROM Document WHERE dc:title ILIKE 'FIM*'
      3. observe that only 50 results are returned (the little text on top of the results table
      4. run this other NXQL query
        SELECT * FROM Document WHERE dc:title ILIKE 'FIM**'
      5. observe that all 100+ results are returned, as expected
        The reason behind this behavior is that these 2 NXQL queries are not translated with the same operator in the Elasticsearch request :
      • one wildcard => "match_phrase_prefix" operator avec "max_expansions" : 50
                  "match_phrase_prefix" : {
                    "dc:title.lowercase" : {
                      "query" : "bar",
                      "slop" : 0,
                      "max_expansions" : 50,
                      "boost" : 1.0
                    }
                  }
        
      • two wildcards => wildcard operator
                  "wildcard" : {
                    "dc:title.lowercase" : {
                      "wildcard" : "bar*",
                      "boost" : 1.0
                    }
                  }
        

      Expected behavior: using "dc:title ILIKE 'FIM*'" should return the all 100+ documents

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: