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

Fix elasticsearch query ecm:path STARTSWITH "/" returning placeless documents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.2
    • Fix Version/s: 10.3
    • Component/s: Elasticsearch

      Description

      When you have a placeless document, it is returned by a page provider plugged on elastic search with a ecm:path STARTSWITH "/" clause despite its path is avatar.jpeg (not /avatar.jpeg).

      Note that a page provider not plugged on es does not return it which is inconsistent anyway.

      Steps to repoduce:

      Note that domain_documents page provider
      is plugged on elasticsearch,

      Root cause is makeStartsWithQuery which just does not take into account placeless documents:

              if ("/".equals(value)) {
                  // match all document with a path
                  filter = QueryBuilders.existsQuery(indexName);
              } 
      

        Attachments

          Issue Links

            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 - 2 hours
                  2h