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

Switching Collections PP produces a loss of functionality in WEB-UI

    XMLWordPrintable

    Details

      Description

      Following NXP-27168.

      In the XXX project, we have tried to migrate some page provider in ElasticSearch using the replacer tag. 

      <replacer withClass="org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider">
        <!-- Collections -->
        <provider>all_user_collections</provider>
        <provider>ordered_content_collection</provider>
        <provider>default_content_collection</provider>
        <!-- CANNOT DO THE FOLLOWING BECAUSE https://jira.nuxeo.com/browse/NXP-27168 NOT FIXED -->
        <!-- <provider>user_collections</provider> -->
        <!-- <provider>default_collection</provider> -->
        <!-- <provider>default_collection_candidate</provider> -->
        <provider>tree_children</provider>
      </replacer>
      

      By applying that configuration, we noticed that collections were not present anymore in webui.

      We run some analysis with Thierry Martins and noticed that this issue is applicable for all PP that contain the following fixed predicate:

      /*+ES: INDEX(dc:title.fulltext) OPERATOR(match_phrase_prefix) */
      

      For exemple:

      <coreQueryPageProvider name="default_collection">
        <property name="maxResults">PAGE_SIZE</property>
        <pattern quoteParameters="false" escapeParameters="true">
          SELECT * FROM Document WHERE /*+ES: INDEX(dc:title.fulltext) OPERATOR(match_phrase_prefix) */
          dc:title ILIKE '?%' AND ecm:mixinType = 'Collection' AND ecm:primaryType != 'Favorites' AND
          ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND
          ecm:isVersion = 0 AND ecm:isTrashed = 0
        </pattern>
        <sort column="dc:title" ascending="true" />
        <pageSize>50</pageSize>
      </coreQueryPageProvider>
      

      This seemed to be caused by the fulltext property applied in the title and do not return anything on empty values, unfortunately those PP are broadly used in webui with the absence of value.

      Reproduce:

      • Migrate default_collection using ES
      • In Webui, click on the Collections button
      • List of collections are empty:

      The workaround is still the same as the one mentioned in NXP-27168.

      There is a possibility whenever Nuxeo will support ES 7.10 to use the zero_terms_query option:
      https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query-phrase-prefix.html

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: