Default query for $search uses deprecated operator

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.22.0
    • Affects Version/s: 1.21.2
    • Component/s: Aggregation pipeline
    • None
    • Iteration Elderberry
    • None
    • None

      The current default query for $search is

      /**
       * search: Analyzed search.
       * term: Unanalyzed search.
       * compound: Combines ops.
       * span: Find in text field regions.
       * exists: Test for presence of a field.
       * near: Find near number or date.
       * range: Find in numeric or date range.
       */
      {
       search: {
       query: 'string'
       path: 'string'
       }
      }

      the search: operator has been deprecated.  It should be replaced with text:

      /**
       * text: Analyzed search.
       * term: Unanalyzed search.
       * compound: Combines ops.
       * span: Find in text field regions.
       * exists: Test for presence of a field.
       * near: Find near number or date.
       * range: Find in numeric or date range.
       */
      {
       text: {
       query: 'string',
       path: 'string'
       }
      }

      It's also missing a comma between the query option and the path option, which could be confusing.

            Assignee:
            Massimiliano Marcon
            Reporter:
            Doug Tarr
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: