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

Apply max_expansions property on any case with match_phrase_prefix operator

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2021.17
    • Fix Version/s: 2021.x, 2023.x, 2025.x
    • Component/s: Elasticsearch

      Description

      NXP-30878 has added the support for the "max_expansions" property when building a query for the LIKE operator. But it does not cover the case when a MatchPhrasePrefixQueryBuilder object is built from a hint, as with the DEFAULT_DOCUMENT_SUGGESTION provider

            <coreQueryPageProvider name="DEFAULT_DOCUMENT_SUGGESTION">
              <property name="maxResults">PAGE_SIZE</property>
              <pattern quoteParameters="false" escapeParameters="true">
                SELECT * FROM Document WHERE /*+ES: INDEX(dc:title.fulltext) OPERATOR(match_phrase_prefix) */ ecm:fulltext.dc:title LIKE '?' AND ecm:mixinType !=
                'HiddenInNavigation' AND ecm:isVersion = 0 AND
                ecm:isTrashed = 0 AND ecm:parentId IS NOT NULL
              </pattern>
              <pageSize>10</pageSize>
            </coreQueryPageProvider> 

      Expected behavior: the custom max_expansions value is set for any case where the match_phrase_prefix operator is used

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: