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

ES: Use phrase prefix operator for quick search

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0, 7.4
    • Fix Version/s: 10.3
    • Component/s: Elasticsearch
    • Release Notes Description:
      Hide

      The suggestion bar now uses match_phrase_prefix and is based on the following query:
      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

      Show
      The suggestion bar now uses match_phrase_prefix and is based on the following query: 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
    • Sprint:
      nxcore 10.3.6
    • Story Points:
      3

      Description

      The quick search (DEFAULT_DOCUMENT_SUGGESTION) page provider use a fulltext search which is based on simple_query_string operator.

      There is an * appended to the input to have a suggestion.

      The problem is that the search query with a wildcard pattern is not analyzed according to an analyzer, it is just lowercased.
      This lead to some missing match depending on the indexing analyzer used.

      NXP-17692 is a work around for accented character.

      This does not solve the problem if the pattern has been stemmed by the fulltext analyzer. For instance searching for 'foos*' will not match an indexed text 'foos'.
      Because the indexed term is "foo", the minimal_english stemmer has removed the ending 's'.

      Also for ideographic characters like in Chinese, the fulltext analyzer creates a token per idograph, exact search is working but adding a wildcard does not work.

      A better suggestion operator is to use match_phrase_prefix.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h